Add a testing tool chain
- use pytest as the base, measure coverage with pytest-cov
+ configure coverage to include branches and specify source locations
+ configure pytest to enforce explicit markers
- add a package for the test suite under tests/
- add a `__version__` identifier at the package's root
+ it is dynamically assigned the version of the installed package
+ the version is PEP440 compliant and follows a strict subset of
semantic versioning: x.y.z[.devN] where x, y, z, and N are all
non-negative integers
+ add module with tests for the __version__
- add a nox session "test" that runs the test suite
- use flake8 to lint pytest for consistent style
This commit is contained in:
parent
c7989e0040
commit
9fc5b4816a
7 changed files with 406 additions and 3 deletions
|
|
@ -1 +1,9 @@
|
|||
"""Source code for the urban-meal-delivery research project."""
|
||||
|
||||
from importlib import metadata
|
||||
|
||||
|
||||
try:
|
||||
__version__ = metadata.version(__name__)
|
||||
except metadata.PackageNotFoundError: # pragma: no cover
|
||||
__version__ = 'unknown'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue