File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11include COPYING AUTHORS CHANGELOG.md requirements*.txt
2- include tox.ini
2+ include tox.ini gitlab/py.typed
33recursive-include tests *
44recursive-include docs *j2 *.js *.md *.py *.rst api/*.rst Makefile make.bat
Original file line number Diff line number Diff line change 1212TEST_DIR = "tests"
1313SDIST_FILE = f"{ __title__ } -{ __version__ } .tar.gz"
1414WHEEL_FILE = f"{ __title__ .replace ('-' , '_' )} -{ __version__ } -py{ sys .version_info .major } -none-any.whl"
15+ PY_TYPED = "gitlab/py.typed"
1516
1617
1718@pytest .fixture (scope = "session" )
@@ -21,19 +22,26 @@ def build(tmp_path_factory: pytest.TempPathFactory):
2122 return temp_dir
2223
2324
24- def test_sdist_includes_docs_and_tests (build : Path ) -> None :
25+ def test_sdist_includes_correct_files (build : Path ) -> None :
2526 sdist = tarfile .open (build / SDIST_FILE , "r:gz" )
2627 sdist_dir = f"{ __title__ } -{ __version__ } "
2728
2829 docs_dir = sdist .getmember (f"{ sdist_dir } /{ DOCS_DIR } " )
2930 test_dir = sdist .getmember (f"{ sdist_dir } /{ TEST_DIR } " )
3031 readme = sdist .getmember (f"{ sdist_dir } /README.rst" )
32+ py_typed = sdist .getmember (f"{ sdist_dir } /{ PY_TYPED } " )
3133
3234 assert docs_dir .isdir ()
3335 assert test_dir .isdir ()
36+ assert py_typed .isfile ()
3437 assert readme .isfile ()
3538
3639
40+ def test_wheel_includes_correct_files (build : Path ) -> None :
41+ wheel = zipfile .ZipFile (build / WHEEL_FILE )
42+ assert PY_TYPED in wheel .namelist ()
43+
44+
3745def test_wheel_excludes_docs_and_tests (build : Path ) -> None :
3846 wheel = zipfile .ZipFile (build / WHEEL_FILE )
3947 assert not any (file .startswith ((DOCS_DIR , TEST_DIR )) for file in wheel .namelist ())
You can’t perform that action at this time.
0 commit comments