From 5a0d9b8f7b42691c7e256415abfa0b0bde8f405e Mon Sep 17 00:00:00 2001 From: Yuxuan 'fishy' Wang Date: Tue, 2 Jan 2024 09:04:19 -0800 Subject: [PATCH] Fix github actions for python3 tests Add a dummy test in test_sslsocket.py to workaround an issue in Python 3.12. --- lib/py/test/test_sslsocket.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/py/test/test_sslsocket.py b/lib/py/test/test_sslsocket.py index 801024a1e6c..a5ea06ae9e4 100644 --- a/lib/py/test/test_sslsocket.py +++ b/lib/py/test/test_sslsocket.py @@ -348,6 +348,13 @@ def test_ssl_context(self): self._assert_connection_success(server, ssl_context=client_context) +# Add a dummy test because starting from python 3.12, if all tests in a test +# file are skipped that's considered an error. +class DummyTest(unittest.TestCase): + def test_dummy(self): + self.assertEqual(0, 0) + + if __name__ == '__main__': logging.basicConfig(level=logging.WARN) from thrift.transport.TSSLSocket import TSSLSocket, TSSLServerSocket, _match_has_ipaddress