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: 10 additions & 10 deletions tests/e2e/test_cli_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_watch_command_dry_run(self) -> None:
# Just test --help to verify command exists and works
result = run(
[sys.executable, "-m", "supsrc.cli.main", "watch", "--help"],
timeout=5,
timeout=30,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The hardcoded timeout of 30 is duplicated across 10 test cases in this PR, which is a maintainability concern. Additionally, this creates an inconsistency with other CLI tests in the same file (e.g., lines 35, 50, 68) that still use a 10 second timeout for more complex operations like config show. If the environment is slow enough to require 30s for a --help command, the 10s limit for configuration loading is likely to cause intermittent failures.\n\nConsider defining a module-level constant (e.g., DEFAULT_CLI_TIMEOUT = 30) and applying it consistently to all CLI integration tests.

check=False,
)

Expand All @@ -110,7 +110,7 @@ def test_watch_command_with_explicit_config(self) -> None:
str(config_path),
"--help",
],
timeout=5,
timeout=30,
check=False,
)

Expand All @@ -127,7 +127,7 @@ def test_sui_command_help(self) -> None:
"""Test that sui command shows help correctly."""
result = run(
[sys.executable, "-m", "supsrc.cli.main", "sui", "--help"],
timeout=5,
timeout=30,
check=False,
)

Expand All @@ -152,7 +152,7 @@ def test_sui_command_validation_only(self) -> None:
str(config_path),
"--help",
],
timeout=5,
timeout=30,
check=False,
)

Expand All @@ -168,7 +168,7 @@ def test_invalid_command_handling(self) -> None:
"""Test handling of invalid commands."""
result = run(
[sys.executable, "-m", "supsrc.cli.main", "nonexistent-command"],
timeout=5,
timeout=30,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The tests test_invalid_command_handling, test_version_command, test_help_command, test_cli_python_path_handling, and test_config_validation_error_reporting have had their timeouts increased to 30s but are not marked with the @pytest.mark.slow decorator.\n\nFor consistency with other long-running tests in this suite (e.g., test_watch_command_dry_run), these should also be marked as slow to allow developers to exclude them during rapid local testing cycles.

check=False,
)

Expand All @@ -179,7 +179,7 @@ def test_version_command(self) -> None:
"""Test version command works."""
result = run(
[sys.executable, "-m", "supsrc.cli.main", "--version"],
timeout=5,
timeout=30,
check=False,
)

Expand All @@ -190,7 +190,7 @@ def test_help_command(self) -> None:
"""Test help command works."""
result = run(
[sys.executable, "-m", "supsrc.cli.main", "--help"],
timeout=5,
timeout=30,
check=False,
)

Expand Down Expand Up @@ -235,7 +235,7 @@ def test_cli_python_path_handling(self) -> None:
# Test running as module
result = run(
[sys.executable, "-m", "supsrc.cli.main", "--help"],
timeout=5,
timeout=30,
check=False,
)

Expand All @@ -249,7 +249,7 @@ def test_cli_signal_handling(self) -> None:
# Test basic CLI command execution
result = run(
[sys.executable, "-m", "supsrc.cli.main", "watch", "--help"],
timeout=5,
timeout=30,
check=False,
)

Expand Down Expand Up @@ -287,7 +287,7 @@ def test_config_validation_error_reporting(self) -> None:
try:
result = run(
[sys.executable, "-m", "supsrc.cli.main", "config", "show", "-c", invalid_config],
timeout=5,
timeout=30,
check=False,
)

Expand Down
Loading