Fix potential problem in Messenger related to MPI window
[hoomd-blue.git] / test / hoomd_script / test_dump_pdb.py
blob89be7f28a86cad77a45e67fbd5e716a73cad96aa
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # unit tests for dump.pdb
9 class dmp_pdb_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.pdb(filename="dump_pdb", period=100);
19 run(101)
20 os.remove("dump_pdb.0000000000.pdb")
22 # tests variable periods
23 def test_variable(self):
24 dump.pdb(filename="dump_pdb", period=lambda n: n*100);
25 run(101);
26 os.remove("dump_pdb.0000000000.pdb")
28 def tearDown(self):
29 init.reset();
31 if __name__ == '__main__':
32 unittest.main(argv = ['test.py', '-v'])