Skip to content

Commit

Permalink
Merge pull request #378 from JamesKunstle/tox-add-pytest
Browse files Browse the repository at this point in the history
adds pytest to tox via `py3-unit`
  • Loading branch information
mergify[bot] authored Dec 20, 2024
2 parents 688bae3 + 6e5638c commit eae2ec8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

[tox]
# py3-unit runs unit tests with 'python3'
# py311-unit runs the same tests with 'python3.11'
envlist = ruff, lint, mypy, spellcheck
envlist = ruff, lint, mypy, spellcheck, py3-unit
minversion = 4.4

[testenv]
Expand All @@ -19,6 +17,14 @@ deps =
[testenv:py3]
basepython = python3.11

[testenv:py3-unit]
description = run unit tests with pytest
commands = {envpython} -m pytest tests {posargs}
# NOTE: {posargs} is a placeholder for input positional arguments
# such as `tox -e py3-unit -- --pdb` if we wanted to run pytest with pdb enabled.
# `--` delimits flags that are meant for tox vs. those that are positional arguments for
# the command that's being run in the environment.

# format, check, and linting targets don't build and install the project to
# speed up testing.
[testenv:lint]
Expand Down

0 comments on commit eae2ec8

Please sign in to comment.