2 ms·
assertEqual(c.re(), 4); assertEqual(c.im(), 7); This is "logically" one assert, on two lines. So I would welcome it In cases like this I find myself extra
by SideburnsOfDoom 5y ago
assertEqual(c.re(), 4);
assertEqual(c.im(), 7);
This is "logically" one assert, on two lines. So I would welcome it
In cases like this I find myself extracting a helper assert method if it gets used 3 or more times.
e.g.
assertEqualComplex(c, 4, 7);
which contains
assertEqual(c.re(), x);
assertEqual(c.im(), y);
Which makes that a bit clearer. This is not the best example but you can get the idea. I might have 5-10 lines in an assertTransactionSuceeded(txn) method.