From 8225089cc9f4bc886acbcd65d73ce9b7a7e6a73e Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 27 Jan 2016 00:07:22 +0000 Subject: [PATCH] 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. --- tests/gadget-zero/test_gadget0.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/gadget-zero/test_gadget0.py b/tests/gadget-zero/test_gadget0.py index ddd449e2..4a14ec9a 100644 --- a/tests/gadget-zero/test_gadget0.py +++ b/tests/gadget-zero/test_gadget0.py @@ -27,6 +27,7 @@ class TestGadget0(unittest.TestCase): def setUp(self): 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.longMessage = True def tearDown(self): uu.dispose_resources(self.dev)