Skip to content

Commit

Permalink
Report stderr contents if flit build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Mar 14, 2023
1 parent 4c68d19 commit 9e280db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 9e280db

Please sign in to comment.