right so I am getting an error with unit testing where I can't use selfassertAlmostEqual
in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: 'list' and 'list
this is my unittest method where I am getting the error any ideas as to how could I fix it thank you.
def test_method_04(self):
self.set_up()
actual = self.bookshop.method_4(self.orders)
expected = [(1, 678.33),(2, 494.46),(3, 364.8),(4, 492.57)]
self.assertAlmostEqual(actual, expected, places = 2)
print("METHOD4 \nACTUAL:")
for line in actual:
print(line)
print("EXPECTED:")
for line in expected:
print(line)
'