tests: show expected, actual _and_ custom messages
See https://docs.python.org/2/library/unittest.html#unittest.TestCase.longMessage Allows showing the 42 != 69 : custom message instead of _only_ showing the custom message if one was specified.
This commit is contained in:
parent
e6f6122965
commit
8225089cc9
@ -27,6 +27,7 @@ class TestGadget0(unittest.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.dev = usb.core.find(idVendor=0xcafe, idProduct=0xcafe, custom_match=find_by_serial(DUT_SERIAL))
|
self.dev = usb.core.find(idVendor=0xcafe, idProduct=0xcafe, custom_match=find_by_serial(DUT_SERIAL))
|
||||||
self.assertIsNotNone(self.dev, "Couldn't find locm3 gadget0 device")
|
self.assertIsNotNone(self.dev, "Couldn't find locm3 gadget0 device")
|
||||||
|
self.longMessage = True
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
uu.dispose_resources(self.dev)
|
uu.dispose_resources(self.dev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user