bit more sophisticated on the partsig horizontal test, use subTest to report
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 2 Oct 2021 17:29:18 +0000 (18:29 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 2 Oct 2021 17:29:18 +0000 (18:29 +0100)
function name and input value

src/ieee754/part/test/test_partsig.py

index d7dd50c74f3e07d010114decc80a03e6a2aab7e3..09805afc18e88a836a6d88418af7a39df396b5cb 100644 (file)
@@ -591,17 +591,18 @@ class TestPartitionedSignal(unittest.TestCase):
                 return test == mask
 
             def test_horizop(msg_prefix, test_fn, mod_attr, *maskbit_list):
-                with self.subTest(msg_prefix):
-                    randomvals = []
-                    for i in range(10):
-                        randomvals.append(randint(0, 65535))
-                    for a in [0x0000,
-                                 0x1234,
-                                 0xABCD,
-                                 0xFFFF,
-                                 0x8000,
-                                 0xBEEF, 0xFEED,
-                                    ]+randomvals:
+                randomvals = []
+                for i in range(10):
+                    randomvals.append(randint(0, 65535))
+                for a in [0x0000,
+                             0x1234,
+                             0xABCD,
+                             0xFFFF,
+                             0x8000,
+                             0xBEEF, 0xFEED,
+                                ]+randomvals:
+                    with self.subTest("%s %s %s" % (msg_prefix,
+                                    test_fn.__name__, hex(a))):
                         yield module.a.lower().eq(a)
                         yield Delay(0.1e-6)
                         # convert to mask_list