diff --git a/pytests/test_container_to_args.py b/pytests/test_container_to_args.py index f584f72..9346b9b 100644 --- a/pytests/test_container_to_args.py +++ b/pytests/test_container_to_args.py @@ -352,6 +352,15 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase): ], ) + async def test_env_file_obj_required_non_existent_path(self): + c = create_compose_mock() + + cnt = get_minimal_container() + cnt['env_file'] = {'path': 'not-exists', 'required': True} + + with self.assertRaises(ValueError): + await container_to_args(c, cnt) + async def test_env_file_obj_optional(self): c = create_compose_mock()