We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think that we need to run a warning check at the end of each test to detect which test generates a warning
On Windows, the tests are generating warnings that are not checked.
inside t.i.test.test_posixbase on Windows
There is also t.t.teste_twisted test_setUidSameAsCurrentUid
If one test wants to check for the warnings, it will receive all the previous "unuexpected" warnings.
See a test run here https://dev.azure.com/twistedmatrix/twisted/_build/results?buildId=4668&view=logs&j=a9f5be88-9f44-53f4-896b-687d3085a015&t=50e42789-57d9-5d74-e8a4-3a4e15f86668&l=16003
Note that test fails at test_delayedCall but most probably the warning was generated by another test.
test_delayedCall
Not sure if this is a bug with the way the tests are written and not waiting for cleanup, or there is a bug on Windows
[ERROR] Traceback (most recent call last): File "D:\a\1\s\.tox\alldeps-withcov-windows\lib\site-packages\twisted\internet\test\test_posixbase.py", line 55, in tearDown len(warnings), 0, f"Warnings found at the end of the test:\n{warnings}" File "D:\a\1\s\.tox\alldeps-withcov-windows\lib\site-packages\twisted\trial\_synctest.py", line 422, in assertEqual super().assertEqual(first, second, msg) File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\case.py", line 852, in assertEqual assertion_func(first, second, msg=msg) File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\case.py", line 845, in _baseAssertEqual raise self.failureException(msg) twisted.trial.unittest.FailTest: 2 != 0 : Warnings found at the end of the test: [{'message': "unclosed <socket.socket fd=1380, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53451), raddr=('127.0.0.1', 53450)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\internet\\defer.py', 'lineno': 497}, {'message': "unclosed <socket.socket fd=1512, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53450), raddr=('127.0.0.1', 53451)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\internet\\defer.py', 'lineno': 497}] twisted.internet.test.test_posixbase.IterationTimeoutTests.test_delayedCall =============================================================================== [ERROR] Traceback (most recent call last): File "D:\a\1\s\.tox\alldeps-withcov-windows\lib\site-packages\twisted\internet\test\test_posixbase.py", line 55, in tearDown len(warnings), 0, f"Warnings found at the end of the test:\n{warnings}" File "D:\a\1\s\.tox\alldeps-withcov-windows\lib\site-packages\twisted\trial\_synctest.py", line 422, in assertEqual super().assertEqual(first, second, msg) File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\case.py", line 852, in assertEqual assertion_func(first, second, msg=msg) File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\unittest\case.py", line 845, in _baseAssertEqual raise self.failureException(msg) twisted.trial.unittest.FailTest: 10 != 0 : Warnings found at the end of the test: [{'message': "unclosed <socket.socket fd=1280, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53457), raddr=('127.0.0.1', 53456)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1512, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53456), raddr=('127.0.0.1', 53457)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1444, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53459), raddr=('127.0.0.1', 53458)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1324, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53458), raddr=('127.0.0.1', 53459)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1380, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53461), raddr=('127.0.0.1', 53460)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1300, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53460), raddr=('127.0.0.1', 53461)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1416, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53465), raddr=('127.0.0.1', 53464)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1248, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53464), raddr=('127.0.0.1', 53465)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=1240, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53467), raddr=('127.0.0.1', 53466)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}, {'message': "unclosed <socket.socket fd=420, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 53466), raddr=('127.0.0.1', 53467)>", 'category': <class 'ResourceWarning'>, 'filename': 'D:\\a\\1\\s\\.tox\\alldeps-withcov-windows\\lib\\site-packages\\twisted\\trial\\_asynctest.py', 'lineno': 110}]
trac-id__10332 10332 type__defect defect reporter__adiroiban adiroiban priority__normal normal milestone__None None branch__ branch_author__ status__new new resolution__None None component__core core keywords__None None time__1649765361197019 1649765361197019 changetime__1649765361197019 1649765361197019 version__None None owner__None None
The text was updated successfully, but these errors were encountered:
defer.inlineCallbacks
I forgot that I have created this ticket.
I am working to fix this in #12018
Closing this as #12018 should fix it
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I think that we need to run a warning check at the end of each test to detect which test generates a warning
On Windows, the tests are generating warnings that are not checked.
inside t.i.test.test_posixbase on Windows
There is also t.t.teste_twisted test_setUidSameAsCurrentUid
If one test wants to check for the warnings, it will receive all the previous "unuexpected" warnings.
See a test run here https://dev.azure.com/twistedmatrix/twisted/_build/results?buildId=4668&view=logs&j=a9f5be88-9f44-53f4-896b-687d3085a015&t=50e42789-57d9-5d74-e8a4-3a4e15f86668&l=16003
Note that test fails at
test_delayedCall
but most probably the warning was generated by another test.Not sure if this is a bug with the way the tests are written and not waiting for cleanup, or there is a bug on Windows
Searchable metadata
The text was updated successfully, but these errors were encountered: