From e2a4db89ba68dd6c436498eacf36fddb98f110d6 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Tue, 7 Apr 2026 15:58:49 +0200 Subject: [PATCH] Add tests for core.python.namespaces.PythonNamespace --- .../core/python/namespaces/test_PythonNamespace.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/unit/core/python/namespaces/test_PythonNamespace.py diff --git a/tests/unit/core/python/namespaces/test_PythonNamespace.py b/tests/unit/core/python/namespaces/test_PythonNamespace.py new file mode 100644 index 0000000..83beaaf --- /dev/null +++ b/tests/unit/core/python/namespaces/test_PythonNamespace.py @@ -0,0 +1,14 @@ +from src.jcloud_docsgen.core.python.namespaces import PythonNamespace +import pytest + +class StrSubclass(str): ... + +@pytest.mark.parametrize('namespace,expected_name', [ + (PythonNamespace(''), ''), + (PythonNamespace(' '), ' '), + (PythonNamespace('a'), 'a'), + (PythonNamespace('1'), '1'), + (PythonNamespace(StrSubclass('')), StrSubclass('')), +]) +def test_PythonNamespace_name_attribute(namespace, expected_name): + assert namespace.name == expected_name \ No newline at end of file