tests: Prevent invocation in root dir, point to src/

Because the code itself only runs properly from inside the `src/` directory,
you cannot run `pytest` from the root directory and have the tests work.

So, set things up such that running `pytest` in the root directory will
only run the one test, and have that test point out the user error.
This commit is contained in:
Athanasius committed 2022-08-29 15:14:34 +01:00
1 parent 0c42764614
commit 5c0515e9c6
2 files changed
+6

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
[pytest]
norecursedirs = src
testpaths = tests/
@@ -0,0 +1,3 @@
"""Inform the invoker they ran `pytest` in the wrong place."""
print('You must run `pytest` from inside the `src/` directory')
assert False