Skip to content

Commit

Permalink
Fix pytest default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Jul 11, 2024
1 parent c4fbd60 commit 2e724fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pip install -e . -r requirements.txt -r requirements-test.txt
python -m pip install -e . -r requirements.txt -r requirements-test.txt
- name: Lint with pre-commit
run: |
pre-commit run --all-files
- name: Test with pytest
run: |
pytest --cov
python -m pytest tests
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ dependencies = [

[project.optional-dependencies]
test = [
"pre-commit",
"pytest",
"pytest-cov",
"pre-commit",
"pytest-randomly",
"ruff"
]

Expand All @@ -35,7 +36,14 @@ packages = ["src/mandr"]
upgrade = true

[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
addopts = [
"--cov=src/",
"--cov=tests/",
"--cov-branch",
"--import-mode=importlib",
"--no-header",
"--verbosity=2",
]

[tool.ruff]
src = ["mandr"]
Expand Down

0 comments on commit 2e724fd

Please sign in to comment.