8000 test(smoke): normalize all dist titles for smoke tests · python-gitlab/python-gitlab@ee013fe · GitHub
[go: up one dir, main page]

Skip to content

Commit ee013fe

Browse files
nejchmax-wittig
authored andcommitted
test(smoke): normalize all dist titles for smoke tests
1 parent 57dfd17 commit ee013fe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/smoke/test_dists.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
DOCS_DIR = "docs"
1212
TEST_DIR = "tests"
13-
SDIST_FILE = f"{__title__}-{__version__}.tar.gz"
14-
WHEEL_FILE = f"{__title__.replace('-', '_')}-{__version__}-py{sys.version_info.major}-none-any.whl"
13+
DIST_NORMALIZED_TITLE = f"{__title__.replace('-', '_')}-{__version__}"
14+
SDIST_FILE = f"{DIST_NORMALIZED_TITLE}.tar.gz"
15+
WHEEL_FILE = f"{DIST_NORMALIZED_TITLE}-py{sys.version_info.major}-none-any.whl"
1516
PY_TYPED = "gitlab/py.typed"
1617

1718

@@ -24,12 +25,11 @@ def build(tmp_path_factory: pytest.TempPathFactory):
2425

2526
def test_sdist_includes_correct_files(build: Path) -> None:
2627
sdist = tarfile.open(build / SDIST_FILE, "r:gz")
27-
sdist_dir = f"{__title__}-{__version__}"
2828

29-
docs_dir = sdist.getmember(f"{sdist_dir}/{DOCS_DIR}")
30-
test_dir = sdist.getmember(f"{sdist_dir}/{TEST_DIR}")
31-
readme = sdist.getmember(f"{sdist_dir}/README.rst")
32-
py_typed = sdist.getmember(f"{sdist_dir}/{PY_TYPED}")
29+
docs_dir = sdist.getmember(f"{DIST_NORMALIZED_TITLE}/{DOCS_DIR}")
30+
test_dir = sdist.getmember(f"{DIST_NORMALIZED_TITLE}/{TEST_DIR}")
31+
readme = sdist.getmember(f"{DIST_NORMALIZED_TITLE}/README.rst")
32+
py_typed = sdist.getmember(f"{DIST_NORMALIZED_TITLE}/{PY_TYPED}")
3333

3434
assert docs_dir.isdir()
3535
assert test_dir.isdir()

0 commit comments

Comments
 (0)
0