示例#1
0
    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)
示例#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)
示例#3
0
    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)
示例#4
0
        def close(obj, event):
            obj.TerminateApp()

            show(cuds, select=(CUBA.TEMPERATURE, "bonds"), testing=close)
示例#5
0
 def test_unknown_container(self):
     container = object()
     with self.assertRaises(TypeError):
         show(container)