def test_lattice_showing_point_data(self): cuds = create_example_lattice() def close(obj, event): obj.TerminateApp() show(cuds, select=(CUBA.TEMPERATURE, "nodes"), testing=close) with self.assertRaises(ValueError): show(cuds, select=(CUBA.TEMPERATURE, "particles"), testing=close) with self.assertRaises(ValueError): show(cuds, select=(CUBA.TEMPERATURE, "points"), testing=close)
def test_lattice_showing_point_data(self): filename = self.filename cuds = create_example_lattice() def close(obj, event): obj.TerminateApp() snapshot(cuds, filename, select=(CUBA.TEMPERATURE, 'nodes')) self.assertImageSavedWithContent(filename) with self.assertRaises(ValueError): snapshot(cuds, filename, select=(CUBA.TEMPERATURE, 'particles')) with self.assertRaises(ValueError): snapshot(cuds, filename, select=(CUBA.TEMPERATURE, 'points'))