Skip to content

Commit 1ccd777

Browse files
committed
Skip test.test_ssl.ThreadedTests.test_wrong_cert_tls13 on windows
Failure: 2026-06-01T20:33:22.6137502Z ====================================================================== 2026-06-01T20:33:22.6138687Z FAIL: test_wrong_cert_tls13 (test.test_ssl.ThreadedTests.test_wrong_cert_tls13) 2026-06-01T20:33:22.6139079Z ---------------------------------------------------------------------- 2026-06-01T20:33:22.6139922Z ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine. (os error 10053) 2026-06-01T20:33:22.6140076Z 2026-06-01T20:33:22.6140508Z During handling of the above exception, another exception occurred: 2026-06-01T20:33:22.6140757Z 2026-06-01T20:33:22.6141051Z Traceback (most recent call last): 2026-06-01T20:33:22.6141607Z File "D:\a\RustPython\RustPython\Lib\test\test_ssl.py", line 238, in wrapper 2026-06-01T20:33:22.6141895Z return func(*args, **kw) 2026-06-01T20:33:22.6142621Z File "D:\a\RustPython\RustPython\Lib\test\test_ssl.py", line 3267, in test_wrong_cert_tls13 2026-06-01T20:33:22.6142922Z with self.assertRaisesRegex( 2026-06-01T20:33:22.6143512Z ~~~~~~~~~~~~~~~~~~~~~~^ 2026-06-01T20:33:22.6143779Z OSError, 2026-06-01T20:33:22.6144033Z ^^^^^^^^ 2026-06-01T20:33:22.6144283Z ...<2 lines>... 2026-06-01T20:33:22.6144550Z 'Broken pipe' 2026-06-01T20:33:22.6144813Z ^^^^^^^^^^^^^ 2026-06-01T20:33:22.6145053Z ): 2026-06-01T20:33:22.6145328Z ^ 2026-06-01T20:33:22.6146900Z AssertionError: "alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|closed by the remote host|Connection reset by peer|Broken pipe" does not match "[WinError 10053] An established connection was aborted by the software in your host machine. (os error 10053)" There are two problems here: 1) WSAECONNABORTED is reported by some socket operation but test case checks only for stringified WSAECONNRESET. I do not know why it does not check for "Software caused connection abort". And I do not know what causes WSAECONNABORTED on Windows and no ECONNABORTED on *nix. Maybe this is some discrepancy between how RustPython and cpython handle sockets. 2) RustPython produces wrong strings for OSError. cpython has a separate mapping for this: https://github.com/python/cpython/blob/5607950ef232dad16d75c0cf53101d9649d89115/Modules/errnomodule.c Also note that there are more tests like this that check OsError by matching strings. The same problem may appear again.
1 parent 061e70d commit 1ccd777

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,6 +3248,7 @@ def test_wrong_cert_tls12(self):
32483248
self.fail("Use of invalid cert should have failed!")
32493249

32503250
@requires_tls_version('TLSv1_3')
3251+
@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON; OSError strings are wrong")
32513252
def test_wrong_cert_tls13(self):
32523253
client_context, server_context, hostname = testing_context()
32533254
# load client cert that is not signed by trusted CA

0 commit comments

Comments
 (0)