1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

tests/device_tests: disable protobuf outputs unless run with -v

This commit is contained in:
matejcik 2018-05-09 18:12:31 +02:00
parent 0b6ec27064
commit 266e34eec4
2 changed files with 7 additions and 3 deletions

View File

@ -18,13 +18,11 @@
from __future__ import print_function from __future__ import print_function
from binascii import hexlify, unhexlify
import pytest
import os import os
from trezorlib import coins from trezorlib import coins
from trezorlib import tx_api from trezorlib import tx_api
from trezorlib.client import TrezorClient, TrezorClientDebugLink from trezorlib.client import TrezorClientDebugLink
from trezorlib.transport import get_transport from trezorlib.transport import get_transport
tests_dir = os.path.dirname(os.path.abspath(__file__)) tests_dir = os.path.dirname(os.path.abspath(__file__))

View File

@ -2,6 +2,7 @@ import pytest
from . import common from . import common
from trezorlib.client import TrezorClient from trezorlib.client import TrezorClient
from trezorlib import log
def device_version(): def device_version():
@ -22,6 +23,11 @@ except:
TREZOR_VERSION = None TREZOR_VERSION = None
def pytest_configure(config):
if config.getoption('verbose'):
log.enable_debug_output()
def pytest_runtest_setup(item): def pytest_runtest_setup(item):
''' '''
Called for each test item (class, individual tests). Called for each test item (class, individual tests).