mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
parent
385521b596
commit
548fb871e0
4 changed files with 68 additions and 13 deletions
11
test/util.py
11
test/util.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue