mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
test(svc-bkp-nfs-2-local): take the project root from the test package
test_backup_nfs_excludes.py (4fcf097e5b) computed the repository root
with Path(__file__).resolve().parents[6], which
test_project_root_import rejects outside a package __init__.py
(quality-high pass 66). The package now exports PROJECT_ROOT exactly as
its sibling files/__init__.py does, and the test imports it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
764b69267c
commit
1d8d0c41e7
2 files changed
+8
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
from pathlib import Path
|
||||
|
||||
PROJECT_ROOT: Path = Path(__file__).resolve().parents[6]
|
||||
|
||||
__all__ = ["PROJECT_ROOT"]
|
||||
+3
-2
@@ -1,12 +1,13 @@
|
||||
import importlib.util
|
||||
import unittest
|
||||
import unittest.mock as mock
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
from typing import ClassVar
|
||||
|
||||
from . import PROJECT_ROOT
|
||||
|
||||
PLUGIN = (
|
||||
Path(__file__).resolve().parents[6]
|
||||
PROJECT_ROOT
|
||||
/ "roles"
|
||||
/ "svc-bkp-nfs-2-local"
|
||||
/ "lookup_plugins"
|
||||
|
||||
Reference in new issue
Block a user