Skip to content

Commit

Permalink
Fix check-manifest relative/pathname (#28)
Browse files Browse the repository at this point in the history
This was a really silly bug: I tried to resolve the relative pathname
a second time, after chdir()'ing to it.
  • Loading branch information
mgedmin committed May 14, 2014
1 parent 5e3e511 commit e87621a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Changelog

* Restore warning about files included in the sdist but not added to the
version control system (`issue #27
<https://github.com/mgedmin/check-manifest/issues/27>`__),
<https://github.com/mgedmin/check-manifest/issues/27>`__).

* Fix ``check-manifest relative/pathname`` (`issue #28
<https://github.com/mgedmin/check-manifest/issues/28>`__).


0.19 (2014-02-09)
Expand Down
2 changes: 1 addition & 1 deletion check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def check_manifest(source_tree='.', create=False, update=False,
"""
all_ok = True
with cd(source_tree):
if not is_package(source_tree):
if not is_package():
raise Failure('This is not a Python project (no setup.py).')
read_config()
read_manifest()
Expand Down
8 changes: 8 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,14 @@ def test_all_is_well(self):
self._create_repo_with_code()
self.assertTrue(check_manifest())

def test_relative_pathname(self):
from check_manifest import check_manifest
os.mkdir('subdir')
os.chdir('subdir')
self._create_repo_with_code()
os.chdir(os.pardir)
self.assertTrue(check_manifest('subdir'))

def test_suggestions(self):
from check_manifest import check_manifest
self._create_repo_with_code()
Expand Down

0 comments on commit e87621a

Please sign in to comment.