def test_valid_cuds_containers(self, setup): # XXX This is a very basic test. # given cuds, kind = setup def close(obj, event): obj.TerminateApp() show(cuds, testing=close)
def test_particles_showing_cell_data(self): cuds = create_example_particles() def close(obj, event): obj.TerminateApp() show(cuds, select=(CUBA.TEMPERATURE, "bonds"), testing=close) with self.assertRaises(ValueError): show(cuds, select=(CUBA.TEMPERATURE, "elements"), testing=close)
def test_mesh_showing_point_data(self): cuds = create_example_mesh() def close(obj, event): obj.TerminateApp() show(cuds, select=(CUBA.TEMPERATURE, "points"), testing=close) with self.assertRaises(ValueError): show(cuds, select=(CUBA.TEMPERATURE, "nodes"), testing=close) with self.assertRaises(ValueError): show(cuds, select=(CUBA.TEMPERATURE, "partiles"), testing=close)
def close(obj, event): obj.TerminateApp() show(cuds, select=(CUBA.TEMPERATURE, "bonds"), testing=close)
def test_unknown_container(self): container = object() with self.assertRaises(TypeError): show(container)