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
4 changes: 2 additions & 2 deletions tests/test_medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_write_empty_content(self):
class TestRunCommandEdges(unittest.TestCase):

def test_timeout(self):
result = run_command("sleep 10", timeout=1)
result = run_command(f'"{sys.executable}" -c "import time; time.sleep(10)"', timeout=1)
self.assertEqual(result["returncode"], -1)
self.assertIn("timed out", result["stderr"])

Expand All @@ -128,7 +128,7 @@ def test_custom_timeout_via_dispatch(self):

def test_pipe_command(self):
result = dispatch("run_command", json.dumps({
"command": "echo hello world | grep hello",
"command": f'"{sys.executable}" -c "print(\'hello world\')" | "{sys.executable}" -c "import sys; print(sys.stdin.read())"',
}))
self.assertIn("hello world", result)

Expand Down