예제 #1
0
    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)
예제 #2
0
    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'))