2022-05-08 07:52:08 +00:00
|
|
|
from pyodide_test_runner import run_in_pyodide
|
2022-03-12 06:05:36 +00:00
|
|
|
|
|
|
|
|
2022-05-09 01:43:26 +00:00
|
|
|
@run_in_pyodide(packages=["test", "ssl"], pytest_assert_rewrites=False)
|
2022-05-26 02:47:43 +00:00
|
|
|
def test_ssl(selenium):
|
2022-03-12 06:05:36 +00:00
|
|
|
import platform
|
|
|
|
import unittest
|
|
|
|
import unittest.mock
|
|
|
|
from test import libregrtest
|
|
|
|
|
|
|
|
platform.platform(aliased=True)
|
|
|
|
name = "test_ssl"
|
|
|
|
ignore_tests = [
|
|
|
|
"*test_context_custom_class*",
|
|
|
|
"*ThreadedTests*",
|
|
|
|
"*ocket*",
|
|
|
|
"test_verify_flags",
|
|
|
|
"test_subclass",
|
|
|
|
"test_lib_reason",
|
|
|
|
]
|
|
|
|
|
|
|
|
try:
|
|
|
|
with unittest.mock.patch(
|
|
|
|
"test.support.socket_helper.bind_port",
|
|
|
|
side_effect=unittest.SkipTest("nope!"),
|
|
|
|
):
|
|
|
|
libregrtest.main(
|
|
|
|
[name], ignore_tests=ignore_tests, verbose=True, verbose3=True
|
|
|
|
)
|
|
|
|
except SystemExit as e:
|
|
|
|
if e.code != 0:
|
|
|
|
raise RuntimeError(f"Failed with code: {e.code}")
|