Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions tests/worker/workflow_sandbox/test_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@
)


def test_workflow_sandbox_stdlib_module_names():
if sys.version_info[1] != 11:
pytest.skip("Test only runs on 3.11")
actual_names = ",".join(sorted(sys.stdlib_module_names))
# Uncomment to print code for generating these
code_lines = [""]
for mod_name in sorted(sys.stdlib_module_names):
if code_lines[-1]:
code_lines[-1] += ","
if len(code_lines[-1]) > 80:
code_lines.append("")
code_lines[-1] += mod_name
code = '_stdlib_module_names = (\n "' + '"\n "'.join(code_lines) + '"\n)'
# TODO(cretz): Point releases may add modules :-(
assert actual_names == ",".join(
sys.stdlib_module_names
), f"Expecting names as {actual_names}. In code as:\n{code}"


def test_workflow_sandbox_restrictions_add_passthrough_modules():
updated = SandboxRestrictions.default.with_passthrough_modules("module1", "module2")
assert (
Expand Down
Loading