From f87d71a7baa95b81b16eedac45ab8784d7470fd6 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Thu, 27 Jun 2024 19:49:59 +0200 Subject: [PATCH] Add test ensuring namespace compatibility --- tests/api/test_registry.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/api/test_registry.py b/tests/api/test_registry.py index df5223a71..ed496e0c8 100644 --- a/tests/api/test_registry.py +++ b/tests/api/test_registry.py @@ -1,6 +1,7 @@ from __future__ import annotations import importlib +from pathlib import Path from types import ModuleType import pytest @@ -36,6 +37,12 @@ class Unrelated: MODULE = SubComponent.__module__ +def test_namespace(): + """Ensure namespace package according to PEP 420.""" + assert not Path("kpops/__init__.py").exists() + assert not Path("kpops/components/__init__.py").exists() + + @pytest.mark.usefixtures("custom_components") def test_iter_namespace(): components_module = importlib.import_module("kpops.components")