forked from ni/nixnet-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox-integration.ini
More file actions
41 lines (38 loc) · 2.1 KB
/
tox-integration.ini
File metadata and controls
41 lines (38 loc) · 2.1 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
# 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]
envlist = py{39,310,311,312,313,py3}-test
isolated_build = true
skip_missing_interpreters=True
[testenv]
# Let Poetry installs all the dependencies and the current package in editable mode
skip_install = true
allowlist_externals = poetry
description = Run tests
commands_pre =
poetry run python --version
poetry run python -c "import platform; print(platform.architecture())"
commands =
poetry sync --with test
poetry run pytest --junit-xml=junit/{envname}.xml --junit-prefix={envname} {posargs: --can-in-interface {env:CAN_FIXTURE_IN_INTERFACE:None} --can-out-interface {env:CAN_FIXTURE_OUT_INTERFACE:None} --lin-in-interface {env:LIN_FIXTURE_IN_INTERFACE:None} --lin-out-interface {env:LIN_FIXTURE_OUT_INTERFACE:None}}
passenv =
CAN_FIXTURE_IN_INTERFACE
CAN_FIXTURE_OUT_INTERFACE
LIN_FIXTURE_IN_INTERFACE
LIN_FIXTURE_OUT_INTERFACE
# Only pypy3-test will be executed in pypy3.9-7.3.9 Travis CI job, and it needs customized commands
[testenv:pypy3-test]
commands =
# poetry export to a requirements.txt file is used as a workaround since `poetry install / sync`
# would raise an AsssertionError from cpyext (CPython compatibility layer) when using
# pypy3.9-7.3.9 in Ubuntu Jammy
poetry export --with test --without-hashes -f requirements.txt --output requirements.txt
poetry run pip install -r requirements.txt
poetry run pip install --no-deps -e .
poetry run pytest --junit-xml=junit/{envname}.xml --junit-prefix={envname} {posargs: --can-in-interface {env:CAN_FIXTURE_IN_INTERFACE:None} --can-out-interface {env:CAN_FIXTURE_OUT_INTERFACE:None} --lin-in-interface {env:LIN_FIXTURE_IN_INTERFACE:None} --lin-out-interface {env:LIN_FIXTURE_OUT_INTERFACE:None}}
[pytest]
addopts = --ignore docs/ --cov nixnet --cov nixnet_examples --cov-report term --cov-report xml --verbose --doctest-modules
markers =
integration: Integration test.