def test_load_all_containers(self): persisted_containers.load_all_persisted_containers_from_disk() persisted_containers.get_persisted_container("24-vial-rack") persisted_containers.get_persisted_container("container-1") persisted_containers.get_persisted_container("container-2") # Skip container-3 is defined in .secret/containers-3.json. with self.assertRaisesRegexp( ValueError, 'Container type "container-3" not found in files: .*'): persisted_containers.get_persisted_container("container-3") # Skip container-4 is defined in .containers-4.json. with self.assertRaisesRegexp( ValueError, 'Container type "container-4" not found in files: .*'): persisted_containers.get_persisted_container("container-4")
def test_load_all_containers(self): persisted_containers.load_all_persisted_containers_from_disk() persisted_containers.get_persisted_container("24-plate") persisted_containers.get_persisted_container("container-1") persisted_containers.get_persisted_container("container-2") # Skip container-3 is defined in .secret/containers-3.json. with self.assertRaisesRegexp( ValueError, 'Container type "container-3" not found in files: .*' ): persisted_containers.get_persisted_container("container-3") # Skip container-4 is defined in .containers-4.json. with self.assertRaisesRegexp( ValueError, 'Container type "container-4" not found in files: .*' ): persisted_containers.get_persisted_container("container-4")
def test_load_persisted_container(self): plate = persisted_containers.get_persisted_container("24-plate") self.assertIsInstance(plate, Container) self.assertIsInstance(plate, Container) wells = [well for well in plate] self.assertTrue(all([isinstance(i, Well) for i in wells])) well_1 = wells[0] well_2 = wells[1] self.assertEqual(well_1.coordinates(), (13.67 + 0, 16.0 + 0, 0)) self.assertEqual(well_2.coordinates(), (13.67 + 0, 16.0 + 19.3, 0))
def test_load_persisted_container(self): plate = persisted_containers.get_persisted_container("24-vial-rack") self.assertIsInstance(plate, Container) self.assertIsInstance(plate, Container) wells = [well for well in plate] self.assertTrue(all([isinstance(i, Well) for i in wells])) well_1 = wells[0] well_2 = wells[1] self.assertEqual(well_1.coordinates(), (5.86 + 0, 8.19 + 0, 0)) self.assertEqual(well_2.coordinates(), (5.86 + 0, 8.19 + 19.3, 0))