Skip to content

Commit 7490246

Browse files
committed
some test cleanup
1 parent dd464ce commit 7490246

3 files changed

Lines changed: 13 additions & 18 deletions

File tree

.readthedocs.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
# .readthedocs.yml
21
# Read the Docs configuration file
32
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
43

54
# TODO: add env variable NMLDB_DATA_PATH = tests/Data
65

7-
# Required
86
version: 2
97

10-
# Set the version of Python and other tools you might need
118
build:
129
os: ubuntu-24.04
1310
tools:
1411
python: "3.13"
1512

16-
# Build documentation in the docs/ directory with Sphinx
1713
sphinx:
1814
configuration: docs/src/conf.py
1915

20-
# Optionally build your docs in additional formats such as PDF and ePub
21-
formats: all
22-
23-
# Optionally declare the Python requirements required to build your docs
2416
python:
2517
install:
2618
- requirements: docs/requirements.txt

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ nml_match_experiments = "DatabankLib.bin.match_experiments:match_experiments"
6060
ignore = ["src/DatabankLib/_version.py"]
6161

6262
[tool.pytest.ini_options]
63-
addopts = "-ra"
63+
testpaths = "tests"
64+
addopts = [
65+
"-ra",
66+
"--cov=DatabankLib",
67+
"--cov-append",
68+
"--cov-report=",
69+
"--import-mode=append",
70+
]
6471
markers = [
6572
"sim1: toy-databank for computing properties from scratch",
6673
"sim2: toy-databank with pre-computed properties for API tests",

tox.ini

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,24 @@ envlist =
77
build
88
tests
99

10-
1110
[testenv]
1211
package = editable
1312
passenv = *
1413
lint_folders =
1514
"{toxinidir}/src/" \
1615
"{toxinidir}/tests/" \
1716
"{toxinidir}/docs/src/"
18-
changedir = {toxinidir}/tests
19-
setenv =
20-
COVERAGE_FILE = {toxinidir}/.coverage
17+
18+
[testenv:tests]
19+
description = Run unit tests with pytest
20+
usedevelop = true
2121
deps =
2222
pytest
2323
pytest-check
2424
pytest-mock
2525
pytest-cov
2626
commands =
27-
pytest --cmdopt=sim2 --cov=DatabankLib --cov-append --cov-report= --import-mode=append {posargs}
28-
# pytest --cmdopt=adddata --cov=DatabankLib --cov-append --cov-report= --import-mode=append {posargs}
29-
pytest --cmdopt=nodata --cov=DatabankLib --cov-append --cov-report= --import-mode=append {posargs}
30-
31-
allowlist_externals = pytest
27+
pytest ={posargs}
3228

3329
[testenv:lint]
3430
description = Run linters and type checks

0 commit comments

Comments
 (0)