From: Luke Kenneth Casson Leighton Date: Sat, 2 Oct 2021 17:29:18 +0000 (+0100) Subject: bit more sophisticated on the partsig horizontal test, use subTest to report X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc310ffe38e011ded5d4538be66055ef12e544ca;p=ieee754fpu.git bit more sophisticated on the partsig horizontal test, use subTest to report function name and input value --- diff --git a/src/ieee754/part/test/test_partsig.py b/src/ieee754/part/test/test_partsig.py index d7dd50c7..09805afc 100644 --- a/src/ieee754/part/test/test_partsig.py +++ b/src/ieee754/part/test/test_partsig.py @@ -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