summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-10-31 13:01:34 +0100
committerNejc Habjan <hab.nejc@gmail.com>2021-10-31 13:01:34 +0100
commitecbcf058183ca369a48affe86243cc85585f4784 (patch)
treea227c46ec8feba575dbc2fb21db82964e1e384a9 /tests
parent0b53c0a260ab2ec2c5ddb12ca08bfd21a24f7a69 (diff)
downloadgitlab-fix/docs-package-in-wheel.tar.gz
fix(build): do not include docs in wheel packagefix/docs-package-in-wheel
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()])