mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-30 01:58:11 +00:00
client: hide uninteresting functions from test tracebacks
This commit is contained in:
parent
2bf34dc4b4
commit
99bc267301
@ -127,6 +127,7 @@ def session(f):
|
|||||||
# with session activation / deactivation
|
# with session activation / deactivation
|
||||||
@functools.wraps(f)
|
@functools.wraps(f)
|
||||||
def wrapped_f(*args, **kwargs):
|
def wrapped_f(*args, **kwargs):
|
||||||
|
__tracebackhide__ = True # pytest traceback hiding - this function won't appear in tracebacks
|
||||||
client = args[0]
|
client = args[0]
|
||||||
client.transport.session_begin()
|
client.transport.session_begin()
|
||||||
try:
|
try:
|
||||||
@ -162,6 +163,7 @@ class BaseClient(object):
|
|||||||
|
|
||||||
@session
|
@session
|
||||||
def call_raw(self, msg):
|
def call_raw(self, msg):
|
||||||
|
__tracebackhide__ = True # pytest traceback hiding - this function won't appear in tracebacks
|
||||||
self.transport.write(msg)
|
self.transport.write(msg)
|
||||||
return self.transport.read()
|
return self.transport.read()
|
||||||
|
|
||||||
@ -362,6 +364,7 @@ class DebugLinkMixin(object):
|
|||||||
self.mnemonic = Mnemonic.normalize_string(mnemonic).split(' ')
|
self.mnemonic = Mnemonic.normalize_string(mnemonic).split(' ')
|
||||||
|
|
||||||
def call_raw(self, msg):
|
def call_raw(self, msg):
|
||||||
|
__tracebackhide__ = True # pytest traceback hiding - this function won't appear in tracebacks
|
||||||
|
|
||||||
if SCREENSHOT and self.debug:
|
if SCREENSHOT and self.debug:
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
@ -381,6 +384,8 @@ class DebugLinkMixin(object):
|
|||||||
return resp
|
return resp
|
||||||
|
|
||||||
def _check_request(self, msg):
|
def _check_request(self, msg):
|
||||||
|
__tracebackhide__ = True # pytest traceback hiding - this function won't appear in tracebacks
|
||||||
|
|
||||||
if self.expected_responses is not None:
|
if self.expected_responses is not None:
|
||||||
try:
|
try:
|
||||||
expected = self.expected_responses.pop(0)
|
expected = self.expected_responses.pop(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user