1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 13:38:12 +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 don't use generic Exception, but rather specific subclass 2017-11-06 11:10:23 +01:00
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 bump version to 0.9.1 2018-03-05 19:14:04 +01:00
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 restore device.py as a deprecated compatibility wrapper 2018-03-05 16:18:32 +01:00
ed25519cosi.py ed25519: remove py2/py3 handling in ed25519 funcs as well 2017-12-18 22:34:15 +01:00
ed25519raw.py ed25519: remove py2/py3 handling in ed25519 funcs as well 2017-12-18 22:34:15 +01:00
mapping.py Added registering custom protobuf messages by application. 2017-12-17 03:17:37 +01:00
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 Rework from Google's protobuf to pure-python protobuf implementation 2017-12-17 02:19:16 +01:00
protocol_v2.py Removed excessive logging 2017-12-17 02:58:35 +01:00
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