From bc310ffe38e011ded5d4538be66055ef12e544ca Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 2 Oct 2021 18:29:18 +0100 Subject: [PATCH] bit more sophisticated on the partsig horizontal test, use subTest to report function name and input value --- src/ieee754/part/test/test_partsig.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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 -- 2.30.2