Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion test/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def _run_command(args: List[str], check: bool = False):
Returns:
subprocess.CompletedProcess instance
"""
cmd = [sys.executable, "-m", "nodescraper.cli.cli"] + args
# -W: avoid runpy RuntimeWarning when nodescraper.cli was imported before -m nodescraper.cli.cli
cmd = [sys.executable, "-W", "ignore::RuntimeWarning", "-m", "nodescraper.cli.cli"] + args
return subprocess.run(
cmd,
capture_output=True,
Expand Down
6 changes: 3 additions & 3 deletions test/functional/test_cli_describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

def test_describe_command_list_plugins(run_cli_command):
"""Test that describe command can list all plugins."""
result = run_cli_command(["describe", "plugin"])
result = run_cli_command(["--log-path", "None", "describe", "plugin"])

assert result.returncode == 0
assert len(result.stdout) > 0
Expand All @@ -40,7 +40,7 @@ def test_describe_command_list_plugins(run_cli_command):

def test_describe_command_single_plugin(run_cli_command):
"""Test that describe command can describe a single plugin."""
result = run_cli_command(["describe", "plugin", "BiosPlugin"])
result = run_cli_command(["--log-path", "None", "describe", "plugin", "BiosPlugin"])

assert result.returncode == 0
assert len(result.stdout) > 0
Expand All @@ -50,7 +50,7 @@ def test_describe_command_single_plugin(run_cli_command):

def test_describe_invalid_plugin(run_cli_command):
"""Test that describe command handles invalid plugin gracefully."""
result = run_cli_command(["describe", "plugin", "NonExistentPlugin"])
result = run_cli_command(["--log-path", "None", "describe", "plugin", "NonExistentPlugin"])

assert result.returncode != 0
output = (result.stdout + result.stderr).lower()
Expand Down
Loading