huashengdun / webssh

:seedling: Web based ssh client
https://webssh.huashengdun.org/
MIT License
4.57k stars 1.3k forks source link

Issue with pytest 8.2.0 and tornado async task #385

Closed kensonman closed 5 months ago

kensonman commented 5 months ago

The Issue with pytest 8.2.0 and tornado async tests was found.

The workaround:

  1. Downgrade the pytest to 8.1.2
pip install 'pytest<8.2.0'
  1. Upgrade the tornado to at least 6.4.1
pip install 'tornado>=6.4.1'
kensonman commented 5 months ago

Current test output:

========== short test summary info ========== ERROR tests/test_app.py::AsyncHTTPTestCase - AttributeError: 'AsyncHTTPTestCase' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppBase - AttributeError: 'TestAppBase' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppBasic - AttributeError: 'TestAppBasic' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::OtherTestBase - AttributeError: 'OtherTestBase' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppInDebugMode - AttributeError: 'TestAppInDebugMode' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithLargeBuffer - AttributeError: 'TestAppWithLargeBuffer' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithRejectPolicy - AttributeError: 'TestAppWithRejectPolicy' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithBadHostKey - AttributeError: 'TestAppWithBadHostKey' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithTrustedStream - AttributeError: 'TestAppWithTrustedStream' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppNotFoundHandler - AttributeError: 'TestAppNotFoundHandler' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithHeadRequest - AttributeError: 'TestAppWithHeadRequest' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithPutRequest - AttributeError: 'TestAppWithPutRequest' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithTooManyConnections - AttributeError: 'TestAppWithTooManyConnections' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithCrossOriginOperation - AttributeError: 'TestAppWithCrossOriginOperation' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithBadEncoding - AttributeError: 'TestAppWithBadEncoding' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_app.py::TestAppWithUnknownEncoding - AttributeError: 'TestAppWithUnknownEncoding' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_profiles.py::AsyncTestCase - AttributeError: 'AsyncTestCase' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_profiles.py::AsyncHTTPTestCase - AttributeError: 'AsyncHTTPTestCase' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_profiles.py::TestWebGUIWithProfiles - AttributeError: 'TestWebGUIWithProfiles' object has no attribute 'runTest'. Did you mean: 'subTest'? ERROR tests/test_profiles.py::TestWebGUIWithoutProfiles - AttributeError: 'TestWebGUIWithoutProfiles' object has no attribute 'runTest'. Did you mean: 'subTest'? !!!!!!!!!! Interrupted: 20 errors during collection !!!!!!!!!! ========== 20 errors in 0.52s ==========

kensonman commented 5 months ago

issue-385-fixing.patch

Attached the patch for upgrading the tornado to 6.4.1