def test_adder_exact(self): c1 = Cell(content=Supported(3)) c2 = Cell(content=Supported(4)) c3 = Cell() adder(c1, c2, c3) scheduler.run() self.assertEqual(c3.content, Supported(7))
def test_str(self): a = Cell() b = Cell() c = Cell() adder(a, b, c) a.add_content('15') b.add_content('13') scheduler.run() self.assertEqual(c.content, '1513')
def test_float(self): a = Cell() b = Cell() c = Cell() adder(a, b, c) a.add_content(1.5) b.add_content(1.3) scheduler.run() self.assertEqual(c.content, 2.8)
def test_integer(self): a = Cell() b = Cell() c = Cell() adder(a, b, c) a.add_content(15) b.add_content(13) scheduler.run() self.assertEqual(c.content, 28)