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('python -c "import time; time.sleep(10)"', timeout=1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Live matrix test review comment: please simplify this generated change.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solve-bug-address-review

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": "python -c \"print('hello world')\" | python -c \"import sys; sys.stdout.writelines(l for l in sys.stdin if 'hello' in l)\"",
}))
self.assertIn("hello world", result)

Expand Down