Commit graph

3 commits

Author SHA1 Message Date
01d270e39c
Add doctests to the test suite
- use xdoctest to validate code snippets in docstrings
- make xdoctest part of the nox session "test" via
  the new `test_docstrings()` test case
- add nox session "test-docstrings" for convenience;
  also, `xdoctest.doctest_module()` does not discover
  docstrings that are imported at the root of the package
  => each new module with docstrings must be added to
     `test_docstrings()` by hand, which is likely forgotten
  => the nox session "test-docstrings" should run on CI
2024-09-10 01:57:02 +02:00
4100a7f3f5
Add __version__ identifier
- `lalib.__version__` is dynamically assigned
- the format is "x.y.z[.dev0|aN|bN|rcN|.postM]"
  where x, y, z, M, and N are non-negative integers
  + x, y, and z model the "major", "minor", and "patch"
    parts of semantic versioning
    (See: https://semver.org/#semantic-versioning-200)
  + M is a single digit and N either 1 or 2
  => This complies with (a strict subset of) PEP440
- add unit tests for the `__version__` identifier
2024-09-10 01:45:47 +02:00
b8ceee39c5
Set up a test suite
- use pytest as the test suite and
  measure test coverage with coverage.py
- add package for the test suite under tests/
- add nox session "test" to run the test suite
  for all supported Python versions
- use flake8 to lint pytest for consistent style
2024-09-10 01:38:26 +02:00