Fix pytests
This commit is contained in:
parent
fe10bbb33b
commit
c8b69c73a9
3 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,7 @@ class TestDefault:
|
||||||
def test_example(self):
|
def test_example(self):
|
||||||
p = Project(
|
p = Project(
|
||||||
directory=Path("example/hello-world.project"),
|
directory=Path("example/hello-world.project"),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
ss = p.services
|
ss = p.services
|
||||||
|
@ -30,6 +31,7 @@ class TestDefault:
|
||||||
def test_empty(self):
|
def test_empty(self):
|
||||||
p = Project(
|
p = Project(
|
||||||
directory=Path("nonexistent"),
|
directory=Path("nonexistent"),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(FileNotFoundError) as exc_info:
|
with pytest.raises(FileNotFoundError) as exc_info:
|
||||||
|
|
|
@ -10,6 +10,7 @@ class TestDefault:
|
||||||
s = Service(
|
s = Service(
|
||||||
name="s",
|
name="s",
|
||||||
content=CommentedMap(),
|
content=CommentedMap(),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert s.name == "s"
|
assert s.name == "s"
|
||||||
|
@ -21,6 +22,7 @@ class TestDefault:
|
||||||
content=CommentedMap({
|
content=CommentedMap({
|
||||||
"image": "repo/image:tag",
|
"image": "repo/image:tag",
|
||||||
}),
|
}),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert s.name == "s"
|
assert s.name == "s"
|
||||||
|
@ -37,6 +39,7 @@ class TestDefault:
|
||||||
"$TARGETDIR/other/dir:/path/to/other/mountpoint",
|
"$TARGETDIR/other/dir:/path/to/other/mountpoint",
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert s.name == "s"
|
assert s.name == "s"
|
||||||
|
@ -52,6 +55,7 @@ class TestDefault:
|
||||||
"$CONFDIR/other/config:/path/to/other/config",
|
"$CONFDIR/other/config:/path/to/other/config",
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert s.name == "s"
|
assert s.name == "s"
|
||||||
|
|
|
@ -9,6 +9,7 @@ class TestServices:
|
||||||
s = Service(
|
s = Service(
|
||||||
name="s",
|
name="s",
|
||||||
content=CommentedMap(),
|
content=CommentedMap(),
|
||||||
|
parent=None,
|
||||||
)
|
)
|
||||||
ss = Services([s])
|
ss = Services([s])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue