summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2023-03-14 15:30:32 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2023-03-14 15:31:23 +0200
commit9e280dbaab9858a753d9e00e87830d607ecfdb43 (patch)
treef636f8c97764a2955b23069ed0f867882d655a15
parent4c68d19b5243f0eafa51243bb765ca7f21115fcf (diff)
downloadwheel-git-9e280dbaab9858a753d9e00e87830d607ecfdb43.tar.gz
Report stderr contents if `flit build` fails
-rw-r--r--tests/test_sdist.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_sdist.py b/tests/test_sdist.py
index 413e320..cc253b7 100644
--- a/tests/test_sdist.py
+++ b/tests/test_sdist.py
@@ -33,9 +33,12 @@ def test_compare_sdists(monkeypatch, tmp_path):
(sdist_build,) = sdist_build_dir.glob("*.tar.gz")
# Flit doesn't allow targeting directories, as far as I can tell
- subprocess.run(
- [sys.executable, "-m", "flit", "build", "--format=sdist"], check=True
+ process = subprocess.run(
+ [sys.executable, "-m", "flit", "build", "--format=sdist"],
+ stderr=subprocess.PIPE,
)
+ if process.returncode != 0:
+ pytest.fail(process.stderr.decode("utf-8"))
(sdist_flit,) = Path("dist").glob("*.tar.gz")