Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_pair_dpd_conservative.py
blob2b6eba9a68f68bf421ad98452cce936976ce9570
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # pair.dpd
9 class pair_dpdc_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 # basic test of creation
17 def test(self):
18 dpdc = pair.dpd_conservative(r_cut=3.0);
19 dpdc.pair_coeff.set('A', 'A', A=1.0, r_cut=2.5);
20 dpdc.update_coeffs();
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);
33 def tearDown(self):
34 init.reset();
37 if __name__ == '__main__':
38 unittest.main(argv = ['test.py', '-v'])