summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-10-31 13:01:34 +0100
committerJohn Villalovos <john@sodarock.com>2021-10-31 07:49:41 -0700
commit68a97ced521051afb093cf4fb6e8565d9f61f708 (patch)
treee68c1fdb239b9b4130d78a9fc7f5c3e7022ada4b /tests
parent5ce3b17f52d9501fea68dee8818e726addb327ac (diff)
downloadgitlab-68a97ced521051afb093cf4fb6e8565d9f61f708.tar.gz
fix(build): do not include docs in wheel package
Diffstat (limited to 'tests')
-rw-r--r--tests/smoke/test_dists.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/smoke/test_dists.py b/tests/smoke/test_dists.py
index 6f38ff7..4324ebe 100644
--- a/tests/smoke/test_dists.py
+++ b/tests/smoke/test_dists.py
@@ -9,6 +9,7 @@ from setuptools import sandbox
from gitlab import __title__, __version__
DIST_DIR = Path("dist")
+DOCS_DIR = "docs"
TEST_DIR = "tests"
SDIST_FILE = f"{__title__}-{__version__}.tar.gz"
WHEEL_FILE = (
@@ -18,8 +19,8 @@ WHEEL_FILE = (
@pytest.fixture(scope="function")
def build():
- sandbox.run_setup("setup.py", ["clean", "--all"])
- return sandbox.run_setup("setup.py", ["sdist", "bdist_wheel"])
+ sandbox.run_setup("setup.py", ["--quiet", "clean", "--all"])
+ return sandbox.run_setup("setup.py", ["--quiet", "sdist", "bdist_wheel"])
def test_sdist_includes_tests(build):
@@ -28,6 +29,6 @@ def test_sdist_includes_tests(build):
assert test_dir.isdir()
-def test_wheel_excludes_tests(build):
+def test_wheel_excludes_docs_and_tests(build):
wheel = zipfile.ZipFile(DIST_DIR / WHEEL_FILE)
- assert [not file.startswith(TEST_DIR) for file in wheel.namelist()]
+ assert not any([file.startswith((DOCS_DIR, TEST_DIR)) for file in wheel.namelist()])