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