Skip to content

Commit 6c083d3

Browse files
committed
create a syntax error organically in the unit test
1 parent 884adce commit 6c083d3

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

tests/test_cli.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,6 @@ async def test_run_syntax_error(self):
455455

456456
# Create a mock hub
457457
mock_hub = AsyncMock()
458-
mock_hub.run = AsyncMock(
459-
side_effect=subprocess.CalledProcessError(
460-
returncode=1, cmd="test", stderr=b"test"
461-
)
462-
)
463458
mock_hub.connect = AsyncMock()
464459

465460
# Set up mocks using ExitStack
@@ -470,7 +465,7 @@ async def test_run_syntax_error(self):
470465
suffix=".py", mode="w+", delete=False, encoding="utf-8"
471466
)
472467
)
473-
temp.write("print('test')")
468+
temp.write("syntax error")
474469
temp_path = temp.name
475470
stack.callback(os.unlink, temp_path)
476471

0 commit comments

Comments
 (0)