2022-07-31 10:00:45 +00:00
|
|
|
from pytest_pyodide import run_in_pyodide
|
2022-03-12 06:05:36 +00:00
|
|
|
|
|
|
|
|
2022-08-21 23:52:50 +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
|
2022-12-02 23:12:33 +00:00
|
|
|
from test import libregrtest # type:ignore[attr-defined]
|
2022-03-12 06:05:36 +00:00
|
|
|
|
|
|
|
platform.platform(aliased=True)
|
|
|
|
name = "test_ssl"
|
|
|
|
ignore_tests = [
|
|
|
|
"*test_context_custom_class*",
|
|
|
|
"*ThreadedTests*",
|
|
|
|
"*ocket*",
|
|
|
|
"test_verify_flags",
|
|
|
|
"test_subclass",
|
|
|
|
"test_lib_reason",
|
2022-08-21 23:52:50 +00:00
|
|
|
"test_unwrap",
|
2022-03-12 06:05:36 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
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:
|
2022-09-13 22:12:40 +00:00
|
|
|
raise RuntimeError(f"Failed with code: {e.code}") from None
|