ResourceWarning: unclosed socket when password is invalid · Issue #211 · oracle/python-oracledb (original) (raw)
sockets to connections that cannot be open (e.g. password is invalid) are closed automatically:
$ python -Wall runtests.py backends.oracle.tests.TransactionalTests
Testing against Django installed in '/django/django' with up to 8 processes
Found 2 test(s).
Creating test database for alias 'default'...
Creating test user...
System check identified no issues (0 silenced).
..
----------------------------------------------------------------------
Ran 2 tests in 2.048s
OK
Destroying test database for alias 'default'...
Destroying test user...
Destroying test database tables...
python runtests.py backends.oracle.tests.TransactionalTests
Testing against Django installed in '/django/django' with up to 8 processes
Found 2 test(s).
Creating test database for alias 'default'...
Creating test user...
System check identified no issues (0 silenced).
.Exception ignored in: <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 38016), raddr=('127.0.0.1', 1521)>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/traceback.py", line 236, in clear_frames
tb.tb_frame.clear()
ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 38016), raddr=('127.0.0.1', 1521)>
.
----------------------------------------------------------------------
Ran 2 tests in 1.860s
OK
Destroying test database for alias 'default'...
Destroying test user...
Destroying test database tables...
No.