1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
9 class pair_dpdc_tests (unittest
.TestCase
):
12 init
.create_random(N
=100, phi_p
=0.05);
14 sorter
.set_params(grid
=8)
16 # basic test of creation
18 dpdc
= pair
.dpd_conservative(r_cut
=3.0);
19 dpdc
.pair_coeff
.set('A', 'A', A
=1.0, r_cut
=2.5);
22 # test missing coefficients
23 def test_set_missing_A(self
):
24 dpdc
= pair
.dpd_conservative(r_cut
=3.0);
25 dpdc
.pair_coeff
.set('A', 'A', r_cut
=1.0);
26 self
.assertRaises(RuntimeError, dpdc
.update_coeffs
);
28 # test missing coefficients
29 def test_missing_AA(self
):
30 dpdc
= pair
.dpd_conservative(r_cut
=3.0);
31 self
.assertRaises(RuntimeError, dpdc
.update_coeffs
);
37 if __name__
== '__main__':
38 unittest
.main(argv
= ['test.py', '-v'])