1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
8 # unit tests for dump.pdb
9 class dmp_pdb_tests (unittest
.TestCase
):
12 init
.create_random(N
=100, phi_p
=0.05);
14 sorter
.set_params(grid
=8)
16 # tests basic creation of the dump
18 dump
.pdb(filename
="dump_pdb", period
=100);
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);
26 os
.remove("dump_pdb.0000000000.pdb")
31 if __name__
== '__main__':
32 unittest
.main(argv
= ['test.py', '-v'])