Improve check for uncommitted files

Fixes #57
This commit is contained in:
Manuel Barkhau 2019-03-24 18:46:39 +01:00
parent 385521b596
commit 548fb871e0
4 changed files with 68 additions and 13 deletions

View file

@ -34,16 +34,19 @@ FIXTURE_PATH_PARTS = [
class Project:
def __init__(self, project="a"):
if not project.startswith("project_"):
project = "project_" + project
def __init__(self, project=None):
tmpdir = pl.Path(tempfile.mkdtemp(prefix="pytest_"))
self.tmpdir = tmpdir
self.dir = tmpdir / "pycalver_project"
self.dir.mkdir()
if project is None:
return
if not project.startswith("project_"):
project = "project_" + project
fixtures_subdir = FIXTURES_DIR / project
for path_parts in FIXTURE_PATH_PARTS: