def test_multiple_sources(self): p = Protocol() c = p.ref("test", None, "96-flat", discard=True) with self.assertRaises(AssertionError): p.consolidate(c.wells_from(0,3), c.wells_from(2,3), "10:microliter") p.consolidate(c.wells_from(0,3), c.well(4), ["10:microliter"]) p.consolidate(c.wells_from(0,3), c.well(4), "10:microliter") self.assertEqual(Unit(30,"microliter"), c.well(4).volume) self.assertEqual(3, len(p.instructions[0].groups[0]["consolidate"]["from"]))
def test_multiple_sources(self): p = Protocol() c = p.ref("test", None, "96-flat", discard=True) with self.assertRaises(AssertionError): p.consolidate(c.wells_from(0, 3), c.wells_from(2, 3), "10:microliter") p.consolidate(c.wells_from(0, 3), c.well(4), ["10:microliter"]) p.consolidate(c.wells_from(0, 3), c.well(4), "10:microliter") self.assertEqual(Unit(30, "microliter"), c.well(4).volume) self.assertEqual( 3, len(p.instructions[0].groups[0]["consolidate"]["from"]))
def test_one_source(self): p = Protocol() c = p.ref("test", None, "96-flat", discard=True) p.consolidate(c.well(0), c.well(4), "30:microliter") self.assertEqual(Unit(30, "microliter"), c.well(4).volume)