2 Commits
Author SHA1 Message Date
jakob.scheid 62cadcc7ae docs(changelog): add project directory structure entry
Added an entry that the implicit Python project directory
structure assumptions have been removed to the changelog.
2026-09-22 19:25:37 +02:00
jakob.scheid ecce3a9b69 test(python-generator): update tests to do not assume src/ directories
Updated tests to do not implicitly assume a 'src/' directory structure
and removed all 'src/' subdirectory structures in test project
directories (if possible).
2026-09-22 19:25:31 +02:00
10 changed files with 5 additions and 4 deletions

No files matched your search

+1
View File
@@ -12,6 +12,7 @@
- Replaced the installation instructions, which used the old registry, with a reference to the Gitea Package Registry in README - Replaced the installation instructions, which used the old registry, with a reference to the Gitea Package Registry in README
- Made Python function signatures (argument default values) compliant with PEP 8 - Made Python function signatures (argument default values) compliant with PEP 8
- Removed implicit project directory structure assumptions
### Deprecated ### Deprecated
@@ -42,7 +42,7 @@ from src.jcloud_docsgen.core.python.namespaces import (
( (
PythonDocumentationGenerator( PythonDocumentationGenerator(
pathlib.Path( pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_2' 'tests/unit/core/python/_core/test_project_dirs/pdir_2/src'
), ),
pathlib.Path( pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_2/docs' 'tests/unit/core/python/_core/test_project_dirs/pdir_2/docs'
@@ -58,7 +58,7 @@ from src.jcloud_docsgen.core.python.namespaces import (
( (
PythonDocumentationGenerator( PythonDocumentationGenerator(
pathlib.Path( pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_3' 'tests/unit/core/python/_core/test_project_dirs/pdir_3/src'
), ),
pathlib.Path( pathlib.Path(
'tests/unit/core/python/_core/test_project_dirs/pdir_3/docs' 'tests/unit/core/python/_core/test_project_dirs/pdir_3/docs'
@@ -85,7 +85,7 @@ def test_PythonDocumentationGenerator_collect_modules(
python_documentation_generator: PythonDocumentationGenerator, python_documentation_generator: PythonDocumentationGenerator,
expected, expected,
): ):
assert python_documentation_generator.namespace() == expected assert python_documentation_generator.namespace().sub_namespaces == expected
@pytest.mark.parametrize( @pytest.mark.parametrize(
@@ -130,7 +130,7 @@ def test_creates_directory():
project_dir = pathlib.Path(project_dir) project_dir = pathlib.Path(project_dir)
# The directory of the package # The directory of the package
package_dir = project_dir / 'src' / 'pkg' package_dir = project_dir / 'pkg'
assert not package_dir.exists() assert not package_dir.exists()
package_dir.mkdir(parents=True, exist_ok=True) package_dir.mkdir(parents=True, exist_ok=True)