Skip to content

Commit 993de6d

Browse files
Remove stdlib_module_names test that is no longer relevant (#1259)
* Remove stdlib_module_names test that is no longer relevant * remove unused import --------- Co-authored-by: tconley1428 <tconley1428@gmail.com>
1 parent 4e6aaef commit 993de6d

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

tests/worker/workflow_sandbox/test_restrictions.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import pathlib
4-
import sys
54
from dataclasses import dataclass
65
from typing import ClassVar
76

@@ -16,25 +15,6 @@
1615
)
1716

1817

19-
def test_workflow_sandbox_stdlib_module_names():
20-
if sys.version_info[1] != 11:
21-
pytest.skip("Test only runs on 3.11")
22-
actual_names = ",".join(sorted(sys.stdlib_module_names))
23-
# Uncomment to print code for generating these
24-
code_lines = [""]
25-
for mod_name in sorted(sys.stdlib_module_names):
26-
if code_lines[-1]:
27-
code_lines[-1] += ","
28-
if len(code_lines[-1]) > 80:
29-
code_lines.append("")
30-
code_lines[-1] += mod_name
31-
code = '_stdlib_module_names = (\n "' + '"\n "'.join(code_lines) + '"\n)'
32-
# TODO(cretz): Point releases may add modules :-(
33-
assert actual_names == ",".join(
34-
sys.stdlib_module_names
35-
), f"Expecting names as {actual_names}. In code as:\n{code}"
36-
37-
3818
def test_workflow_sandbox_restrictions_add_passthrough_modules():
3919
updated = SandboxRestrictions.default.with_passthrough_modules("module1", "module2")
4020
assert (

0 commit comments

Comments
 (0)