Skip to content

Commit 3d77f29

Browse files
committed
fix for flay test
1 parent 1bcb30b commit 3d77f29

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

test/functional/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def _run_command(args: List[str], check: bool = False):
6161
Returns:
6262
subprocess.CompletedProcess instance
6363
"""
64-
cmd = [sys.executable, "-m", "nodescraper.cli.cli"] + args
64+
# -W: avoid runpy RuntimeWarning when nodescraper.cli was imported before -m nodescraper.cli.cli
65+
cmd = [sys.executable, "-W", "ignore::RuntimeWarning", "-m", "nodescraper.cli.cli"] + args
6566
return subprocess.run(
6667
cmd,
6768
capture_output=True,

test/functional/test_cli_describe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

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

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

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

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

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

5555
assert result.returncode != 0
5656
output = (result.stdout + result.stderr).lower()

0 commit comments

Comments
 (0)