Skip to content

Commit 00608d7

Browse files
committed
fix(tests): move tarfile assertions inside with block
1 parent 303f5c3 commit 00608d7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/e2e/reqstool_python_hatch_plugin/test_build_e2e.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ def test_hatch_build_sdist_contains_reqstool_artifacts():
6161

6262
with tarfile.open(tarballs[-1]) as tf:
6363
names = tf.getnames()
64-
65-
for expected in EXPECTED_IN_TARBALL:
66-
assert any(expected in n for n in names), f"{expected!r} missing from {tarballs[-1].name};\ngot: {names}"
64+
for expected in EXPECTED_IN_TARBALL:
65+
assert any(
66+
expected in n for n in names
67+
), f"{expected!r} missing from {tarballs[-1].name};\ngot: {names}"
6768

6869
# annotations.yml is generated on disk (not bundled in the tarball)
6970
annotations_file = tmp_project / "build" / "reqstool" / "annotations.yml"

0 commit comments

Comments
 (0)