Fix regression of default behaviour in Command.project_name

Needed an `os.abspath` in there. Added more tests, too.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2014-07-14 11:32:10 -07:00
commit 91fe414522
2 changed files with 18 additions and 2 deletions

View file

@ -69,7 +69,7 @@ class Command(DocoptCommand):
@cached_property
def project_name(self):
project = os.path.basename(os.path.dirname(self.yaml_path))
project = os.path.basename(os.path.dirname(os.path.abspath(self.yaml_path)))
if self.explicit_project_name is not None:
project = self.explicit_project_name
project = re.sub(r'[^a-zA-Z0-9]', '', project)