Include the device type in test case output

This commit is contained in:
Andrew Chow 2019-01-14 14:57:38 -05:00
parent a0fa20888a
commit b404a5050d
3 changed files with 18 additions and 0 deletions

View File

@ -75,6 +75,12 @@ class DeviceTestCase(unittest.TestCase):
suite.addTest(testclass(rpc, rpc_userpass, type, path, fingerprint, master_xpub, password, emulator, name))
return suite
def __str__(self):
return '{}: {}'.format(self.type, super().__str__())
def __repr__(self):
return '{}: {}'.format(self.type, super().__repr__())
class TestDeviceConnect(DeviceTestCase):
def setUp(self):
self.emulator.start()

View File

@ -73,6 +73,12 @@ class KeepkeyTestCase(unittest.TestCase):
suite.addTest(testclass(emulator, name))
return suite
def __str__(self):
return 'keepkey: {}'.format(super().__str__())
def __repr__(self):
return 'keepkey: {}'.format(super().__repr__())
# Keepkey specific getxpub test because this requires device specific thing to set xprvs
class TestKeepkeyGetxpub(KeepkeyTestCase):
def setUp(self):

View File

@ -70,6 +70,12 @@ class TrezorTestCase(unittest.TestCase):
suite.addTest(testclass(emulator, name))
return suite
def __str__(self):
return 'trezor: {}'.format(super().__str__())
def __repr__(self):
return 'trezor: {}'.format(super().__repr__())
# Trezor specific getxpub test because this requires device specific thing to set xprvs
class TestTrezorGetxpub(TrezorTestCase):
def setUp(self):