diff --git a/poetry.lock b/poetry.lock index c6857b39..3eb163d7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1265,6 +1265,23 @@ pytest-asyncio = ">=0.17.2" [package.extras] testing = ["coverage (==6.2)", "mypy (==0.931)"] +[[package]] +name = "pytest-archon" +version = "0.0.6" +description = "Rule your architecture like a real developer" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-archon-0.0.6.tar.gz", hash = "sha256:5af260a7617fc0a9e8bcd7a62adc42ed1ad466e20ae128b218589f49f73b1bcf"}, + {file = "pytest_archon-0.0.6-py3-none-any.whl", hash = "sha256:f49b6b1f33a541dda1cab8a733b93b8a712594a002f03283294a624d0b394e83"}, +] + +[package.dependencies] +pytest = ">=7.2" + +[package.extras] +dev = ["black", "check-manifest", "check-wheel-contents", "coverage", "flake8", "mypy", "pyroma"] + [[package]] name = "pytest-asyncio" version = "0.24.0" @@ -1770,4 +1787,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "541327434d7d3eabae4e0936e1dd88bf63462b363b733376ce5ed5d852cc668d" +content-hash = "13b7eb3dda4a28354933ed63c0ffe0a24fbd1f720e6befca42bfc22750d9d905" diff --git a/pyproject.toml b/pyproject.toml index 3e775634..c7649106 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ pytest-md = "^0.2.0" coverage = { extras = ["toml"], version = "^7.4.4" } selenium = "^4.19.0" lxml-stubs = "^0.5.1" +pytest-archon = "^0.0.6" [tool.poetry.group.linter] dependencies = { ruff = "^0.6.3" } diff --git a/tests/test_arch.py b/tests/test_arch.py new file mode 100644 index 00000000..f48f91f7 --- /dev/null +++ b/tests/test_arch.py @@ -0,0 +1,10 @@ +from pytest_archon import archrule + + +def test_questionpy_should_not_import_sdk() -> None: + ( + archrule("questionpy_should_not_import_sdk", comment="The questionpy package must work without the SDK.") + .match("questionpy*") + .should_not_import("questionpy_sdk*") + .check("questionpy") + )