From eddc5ee505849ce7cfe399181eaa07037eb26314 Mon Sep 17 00:00:00 2001 From: Wagner Macedo Date: Tue, 31 Jan 2023 22:28:05 +0100 Subject: [PATCH] also check tarfile content --- tests/console/commands/test_build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/console/commands/test_build.py b/tests/console/commands/test_build.py index 8764c363e05..3a0f8ea916d 100644 --- a/tests/console/commands/test_build.py +++ b/tests/console/commands/test_build.py @@ -1,6 +1,7 @@ from __future__ import annotations import shutil +import tarfile from pathlib import Path from typing import TYPE_CHECKING @@ -37,3 +38,7 @@ def test_build_with_multiple_readme_files( (wheel_file,) = build_dir.glob("my_package-0.1-*.whl") assert wheel_file.exists() assert wheel_file.stat().st_size > 0 + + sdist_content = tarfile.open(sdist_file) + assert "my_package-0.1/README-1.rst" in sdist_content + assert "my_package-0.1/README-2.rst" in sdist_content