From ecdc76a2a1fcce9b89d5d8a336219ced47c1a711 Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Thu, 19 May 2022 00:38:42 +0800 Subject: [PATCH] style: separate different tests --- tests/test_extends.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_extends.py b/tests/test_extends.py index 8b28cd1..a655be7 100644 --- a/tests/test_extends.py +++ b/tests/test_extends.py @@ -3,14 +3,24 @@ import pytest from compose_viz.extends import Extends -def test_extend_init(): +def test_extend_init_normal(): try: Extends(service_name="frontend", from_file="tests/in/000001.yaml") + + assert True + except Exception as e: + assert False, e + + +def test_extend_init_without_from_file(): + try: Extends(service_name="frontend") assert True except Exception as e: assert False, e + +def test_extend_init_without_service_name(): with pytest.raises(TypeError): Extends(from_file="tests/in/000001.yaml") # type: ignore