Esempio n. 1
0
        def run_show():
            particles = Particles("test")
            random.seed(42)
            for i in range(0, 1000):
                particle = Particle(coordinates=(random.uniform(0.0, 10.0),
                                                 random.uniform(0.0, 10.0),
                                                 random.uniform(0.0, 10.0)))
                particles.add_particles([particle])

            show(particles)
Esempio n. 2
0
 def test_unknown_container(self):
     container = object()
     with self.assertRaises(TypeError):
         show(container)
Esempio n. 3
0
    def test_mesh_show(self):
        mesh = Mesh('test')

        with self.assertRaises(TypeError):
            show(mesh)
Esempio n. 4
0
    def test_lattice_show(self):
        lattice = create_lattice()

        with self.assertRaises(TypeError):
            show(lattice)