Skip to content

Commit 9e280db

Browse files
committed
Report stderr contents if flit build fails
1 parent 4c68d19 commit 9e280db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_sdist.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ def test_compare_sdists(monkeypatch, tmp_path):
3333
(sdist_build,) = sdist_build_dir.glob("*.tar.gz")
3434

3535
# Flit doesn't allow targeting directories, as far as I can tell
36-
subprocess.run(
37-
[sys.executable, "-m", "flit", "build", "--format=sdist"], check=True
36+
process = subprocess.run(
37+
[sys.executable, "-m", "flit", "build", "--format=sdist"],
38+
stderr=subprocess.PIPE,
3839
)
40+
if process.returncode != 0:
41+
pytest.fail(process.stderr.decode("utf-8"))
3942

4043
(sdist_flit,) = Path("dist").glob("*.tar.gz")
4144

0 commit comments

Comments
 (0)