2022-02-14 09:42:06 +00:00
|
|
|
# NOTE: for running the tests locally in `nix-shell`, it is necessary
|
|
|
|
# to spawn the `nix-shell` with `fullDeps` argument, so the command is:
|
|
|
|
# `nix-shell --arg fullDeps true`
|
|
|
|
# This will make sure all the python versions are installed.
|
|
|
|
# (it could be beneficial to comment out `bitcoind` in `shell.nix` locally before running it,
|
|
|
|
# as building that from source takes a very long time)
|
|
|
|
|
2016-10-17 12:17:18 +00:00
|
|
|
[tox]
|
2022-06-30 12:56:40 +00:00
|
|
|
envlist = py{36,37,38,39,310}-{minimal,default,full}
|
2016-10-17 12:17:18 +00:00
|
|
|
|
|
|
|
[testenv]
|
2017-06-23 17:23:08 +00:00
|
|
|
deps =
|
2019-08-09 16:08:35 +00:00
|
|
|
-rrequirements.txt
|
2022-06-30 12:56:40 +00:00
|
|
|
!minimal: pytest>=3.6
|
|
|
|
!minimal: pytest-random-order
|
|
|
|
!minimal: importlib-metadata!=0.21
|
|
|
|
full: -rrequirements-optional.txt
|
2017-06-23 17:23:08 +00:00
|
|
|
commands =
|
2018-07-04 15:40:56 +00:00
|
|
|
# Generate local files
|
2018-08-21 16:13:53 +00:00
|
|
|
python setup.py build
|
2018-07-04 15:40:56 +00:00
|
|
|
# Working in the local directory, try to compile all bytecode
|
2019-08-09 16:08:35 +00:00
|
|
|
python -m compileall src tests
|
|
|
|
# Smoke-test trezorctl
|
2018-07-04 15:40:56 +00:00
|
|
|
trezorctl --help
|
2019-08-09 16:08:35 +00:00
|
|
|
# Run test suite
|
2022-06-30 12:56:40 +00:00
|
|
|
!minimal: pytest --random-order tests
|