compose-viz/tests/test_extends.py

17 lines
380 B
Python
Raw Normal View History

2022-05-18 15:12:24 +08:00
import pytest
2022-05-18 23:28:18 +08:00
2022-05-18 15:24:51 +08:00
from compose_viz.extends import Extends
2022-05-18 23:28:18 +08:00
2022-05-18 15:24:51 +08:00
def test_extend_init():
try:
2022-05-18 23:28:18 +08:00
Extends(service_name="frontend", from_file="tests/in/000001.yaml")
Extends(service_name="frontend")
2022-05-18 15:24:51 +08:00
assert True
2022-05-18 23:28:18 +08:00
except Exception as e:
assert False, e
2022-05-18 15:24:51 +08:00
with pytest.raises(TypeError):
2022-05-18 23:28:18 +08:00
Extends(from_file="tests/in/000001.yaml") # type: ignore