Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_dump_xml.py
blobc2afc68aab68897aedf867394945805d88e60774
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # unit tests for dump.xml
9 class dmp_xml_tests (unittest.TestCase):
10 def setUp(self):
11 print
12 init.create_random(N=100, phi_p=0.05);
14 sorter.set_params(grid=8)
16 # tests basic creation of the dump
17 def test(self):
18 dump.xml(filename="dump_xml", period=100);
20 # test variable period
21 def test_variable(self):
22 dump.xml(filename="dump_xml", period=lambda n: n*100);
24 # test set_params
25 def test_set_params(self):
26 xml = dump.xml(filename="dump_xml", period=100);
27 xml.set_params(position=True);
28 xml.set_params(velocity=True);
29 xml.set_params(mass=False);
30 xml.set_params(diameter=False);
31 xml.set_params(type=True);
32 xml.set_params(wall=True);
33 xml.set_params(bond=True);
34 xml.set_params(image=True);
35 xml.set_params(all=True);
37 def tearDown(self):
38 init.reset();
40 if __name__ == '__main__':
41 unittest.main(argv = ['test.py', '-v'])