Skip to content

Commit

Permalink
test: update namespace test
Browse files Browse the repository at this point in the history
  • Loading branch information
mawillcockson committed Dec 4, 2021
1 parent 0b44c88 commit a712de7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ def test_build_wheel_only(copy_sample):
def test_build_ns_main(copy_sample):
td = copy_sample('ns1-pkg')
(td / '.git').mkdir() # Fake a git repo

with MockCommand('git', LIST_FILES_TEMPLATE.format(
python=sys.executable, module='ns1/pkg/__init__.py')):
tracked = [
'EG_README.rst',
'ns1/pkg/__init__.py',
'pyproject.toml',
]
untracked_deleted = ['dist/ns1.pkg-0.1.tar.gz']

with MockCommand('git', make_git_script(tracked=tracked,
untracked_deleted=untracked_deleted)):
res = build.main(td / 'pyproject.toml')
assert res.wheel.file.suffix == '.whl'
assert res.sdist.file.name.endswith('.tar.gz')
Expand Down

0 comments on commit a712de7

Please sign in to comment.