Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tox for local development testing #28

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ clean: ## Clean project files
@find . -name '__pycache__' -exec rm -fr {} +
@find . -name '*.pyc' -exec rm -f {} +
@find . -name '*.pyo' -exec rm -f {} +
@rm -rf .pdm-build .ruff_cache .coverage .pdm-python dist
@rm -rf .pdm-build .ruff_cache .coverage .pdm-python dist .tox
@coverage erase
128 changes: 126 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ lint.ignore = [
[tool.pdm]
distribution = true

[tool.pdm.dev-dependencies]
dev = [
"pytest==8.3.3",
"pytest-cov==6.0.0",
"pytest-randomly==3.16.0",
"coverage==7.6.4",
"pytest-sugar==1.0.0",
"pytest-clarity==1.0.1",
]

[tool.pdm.scripts]
unit-test = "pdm run make unit-test"
coverage = "pdm run make coverage"
Expand All @@ -79,3 +69,6 @@ skip_empty = true
[tool.coverage.run]
branch = true
source = ["command_line_assistant"]

[dependency-groups]
dev = ["pytest==8.3.3", "pytest-cov==6.0.0", "pytest-randomly==3.16.0", "coverage==7.6.4", "pytest-sugar==1.0.0", "pytest-clarity==1.0.1", "tox>=4.23.2", "tox-pdm>=0.7.2"]
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
envlist = py3{9,12}
isolated_build = true

[testenv]
setenv =
# Ignore the python version defined in .pdm-python
PDM_IGNORE_SAVED_PYTHON='1'
groups =
dev
allowlist_externals = pdm
# Execute pdm run unit-test
commands = unit-test {posargs}