forked from ni/nidaqmx-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
48 lines (43 loc) · 1.95 KB
/
tox.ini
File metadata and controls
48 lines (43 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
isolated_build = true
# grpcio does not have binary wheels for pypy or free-threading, as of version 1.75.1.
# nidaqmxbot does not have pypy yet.
# TODO: Get system tests running on Python 3.14t (free-threaded) - https://github.com/ni/nidaqmx-python/issues/853
envlist = clean, py{310,311,312,313,314,314}-base, py{310,311,312,313,314}-grpc, py310-base-nicaiu, py310-base-nicai_utf8, py310-base-benchmark, report, docs
[testenv]
skip_install = true
allowlist_externals = poetry
setenv =
base: INSTALL_OPTS=--only main,test
grpc: INSTALL_OPTS=--only main,test --extras grpc
base: PYTEST_OPTS=-k "library"
grpc: PYTEST_OPTS=
nicaiu: NIDAQMX_C_LIBRARY=nicaiu
nicai_utf8: NIDAQMX_C_LIBRARY=nicai_utf8
platform =
nicaiu: win32
nicai_utf8: win32
commands =
poetry run python -VV
poetry install -v {env:INSTALL_OPTS}
poetry run python -c "from nidaqmx._lib import lib_importer; print(f'Library: {lib_importer.windll._library._name}\nLibrary encoding: {lib_importer.encoding}')"
!benchmark: poetry run pytest --quiet --cov=generated/nidaqmx --cov-append --cov-report= --junitxml=test_results/system-{envname}.xml {env:PYTEST_OPTS} {posargs}
benchmark: poetry run pytest tests/benchmark/ --quiet --junitxml=test_results/benchmark-{envname}.xml {env:PYTEST_OPTS} {posargs}
[testenv:clean]
commands = poetry run coverage erase
[testenv:report]
commands =
poetry run coverage html
poetry run coverage report
[testenv:docs]
# base_python should match the version specified in .readthedocs.yml and the PR workflow.
base_python = python3.11
commands =
poetry run python -VV
poetry install -v --only main,docs
# Use -W to treat warnings as errors.
poetry run sphinx-build -b html -W docs docs/_build