Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

test(sandbox): use current interpreter for output limit test

XZH7c62d604da46
diff --git a/tests/services/sandbox/test_sandbox.py b/tests/services/sandbox/test_sandbox.py
index edc41ae48..fdb1d0f39 100644
--- a/tests/services/sandbox/test_sandbox.py
+++ b/tests/services/sandbox/test_sandbox.py
@@ -240,8 +240,8 @@ async def test_restricted_subprocess_timeout() -> None:
async def test_restricted_subprocess_caps_output_while_draining_streams() -> None:
backend = RestrictedSubprocessBackend()
result = await backend.exec(
- ExecRequest(
- command="python3 -c \"print('x' * 50_000, end='')\"",
+ ExecRequest.of_argv(
+ [sys.executable, "-X", "utf8", "-c", "print('x' * 50_000, end='')"],
limits=ResourceLimits(timeout_s=10, max_output_chars=1_000),
)
)