Skip to content

Commit f259bfd

Browse files
committed
tests: add a check in tests for the pip warning
Signed-off-by: Henry Schreiner <[email protected]>
1 parent f252274 commit f259bfd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_0_basic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121

2222

23-
def test(tmp_path, build_frontend_env):
23+
def test(tmp_path, build_frontend_env, capfd):
2424
project_dir = tmp_path / "project"
2525
basic_project.generate(project_dir)
2626

@@ -31,6 +31,10 @@ def test(tmp_path, build_frontend_env):
3131
expected_wheels = utils.expected_wheels("spam", "0.1.0")
3232
assert set(actual_wheels) == set(expected_wheels)
3333

34+
# Verify pip warning not shown
35+
captured = capfd.readouterr()
36+
assert "WARNING: Running pip as the 'root' user can result" not in captured.err
37+
3438

3539
@pytest.mark.skip(reason="to keep test output clean")
3640
def test_sample_build(tmp_path, capfd):

0 commit comments

Comments
 (0)