← 返回首页
test(smoke): normalize all dist titles for smoke tests · python-gitlab/python-gitlab@ee013fe · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit ee013fe

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

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎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)

Footer

© 2026 GitHub, Inc.