def test_particles_showing_cell_data(self):
        filename = self.filename
        cuds = create_example_particles()

        snapshot(cuds, filename, select=(CUBA.TEMPERATURE, 'bonds'))
        self.assertImageSavedWithContent(filename)

        with self.assertRaises(ValueError):
            snapshot(cuds, filename, select=(CUBA.TEMPERATURE, 'elements'))
Beispiel #2
0
    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)