diff --git a/tests/test_extends.py b/tests/test_extends.py index ce4662b..daab3c5 100644 --- a/tests/test_extends.py +++ b/tests/test_extends.py @@ -17,3 +17,6 @@ def test_extend_init(): def test_service_init(): with pytest.raises(ValueError, match=r"Both image and extends are not defined in service 'frontend', aborting."): Service(name='frontend') + + with pytest.raises(ValueError, match=r"Only one of image and extends can be defined in service '{name}', aborting."): + Service(name='frontend', image='image', extends=Extends(service_name='frontend', from_file='tests/in/000001.yaml'))