Skip to content
Merged
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
20 changes: 0 additions & 20 deletions tests/worker/workflow_sandbox/test_restrictions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import pathlib
import sys
from dataclasses import dataclass
from typing import ClassVar

Expand All @@ -16,25 +15,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