From 50129418bbad8a6c3aad98d554cae45c772d54e3 Mon Sep 17 00:00:00 2001 From: Mark Bonicillo Date: Tue, 9 Apr 2024 13:39:12 -0700 Subject: [PATCH] Move pytest config into pyproject --- pyproject.toml | 9 +++++++++ pytest.ini | 8 -------- tox.ini | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 6d7965ce..d2cf075d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,3 +80,12 @@ commitizen = {version = "^3.20.0", optional = true} [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-ra" +testpaths = [ + "hypernetx/classes/tests", + "hypernetx/classes/algorithms", +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 937fc3a8..00000000 --- a/pytest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pytest] -minversion = 6.0 -; addopts are a set of optional arguments given to pytest: -; '-rA' will show a short test summary with the results for every test' -addopts = -rA -testpaths = - hypernetx/classes/tests - hypernetx/classes/algorithms diff --git a/tox.ini b/tox.ini index 230838b5..1b8cfb70 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ description = run tests allowlist_externals = env, poetry parallel_show_output = true commands_pre = - poetry install --with test --all-extras + poetry install --with test commands = env poetry run coverage run --source=hypernetx -m pytest --junitxml=pytest.xml @@ -36,7 +36,7 @@ commands = description = run tests on jupyter notebooks basepython = python3.9 commands_pre = - poetry install --with test,tutorials,widget --all-extras + poetry install --with test,tutorials,widget commands = poetry run pytest --nbmake "tutorials/" --junitxml=pytest_notebooks.xml -n=auto --nbmake-timeout=300 --nbmake-find-import-errors