1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-13 11:29:11 +00:00
trezor-firmware/trezorlib
matejcik af98a4071a device_tests: allow custom runxfail
We can now selectively runxfail certain tests. This is useful for
accepting PRs into trezor-core:

1. trezor-core is going to get a pytest.ini that sets xfail_strict.
   That means that if an `xfail`ed test actually passes, that will
   break the test suite. So it will be visible when we implement
   a feature for which tests exist.
2. To allow PRs to pass the test suite without touching python-trezor
   directly, we add a new pytest.ini option: run_xfail.
   This adds a list of markers which will ignore `xfail`.
   So:
   2.1 First, the python-trezor PR marks the tests with the name
       of the feature. This commit already does that: Lisk tests
       are marked `@pytest.mark.lisk`, NEMs are `@pytest.mark.nem`,
       etc.
       The tests will be also marked with `xfail`, because the
       feature is not in core yet.
   2.2 Then, the trezor-core PR implements the feature, which makes
       the `xfail`ed tests pass. That breaks the test suite.
   2.3 To fix the test suite, the core PR also adds a `run_xfail`
       to `pytest.ini`: `run_xfail = lisk`.
       (it can take a list: `run_xfail = lisk nem stellar`)
       That will make the test suite behave as if the tests are not
       `xfail`ed. If the feature is implemented correctly, the tests
       will pass.
   2.4 When the PR is accepted to core, the next step should be
       a PR to python-trezor that removes the `xfail`s. After that,
       we should also remove the `run_xfail` option, just to be tidy.
2018-05-22 17:29:03 +02:00
..
messages stellar: StellarSignMessage.message is bytes 2018-05-14 15:17:13 +02:00
qt
tests device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
transport flake8: make flake8 better and more strict 2018-04-10 15:58:34 +02:00
__init__.py
ckd_public.py start dropping py2 compatibility code 2018-03-06 15:50:54 +01:00
client.py stellar: xdr parse move to trezorctl; client works with messages 2018-05-17 17:17:09 +02:00
coins.py coins: wrap JSON errors in an ImportError 2018-04-10 15:58:34 +02:00
debuglink.py debuglink: add new fields 2018-03-20 16:47:11 +01:00
device.py
ed25519cosi.py
ed25519raw.py
mapping.py
nem.py tests/device/nem: multisig tests 2018-04-10 14:50:01 +02:00
protobuf.py protobuf: improve description of sint_to_uint 2018-05-07 14:10:34 +02:00
protocol_v1.py
protocol_v2.py
stellar.py fix style to match flake8 2018-04-28 12:59:08 -06:00
tools.py replace removed iterbytes with direct iteration 2018-03-06 15:50:54 +01:00
tx_api.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00