Skip to content

Commit

Permalink
tests: Remove calls to private methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Sep 18, 2020
1 parent 5d6e1d3 commit 8d28cfa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions testsuite/python/test_checkpoint.py
Expand Up @@ -282,10 +282,8 @@ def test_integrator_SDM_gpu(self):
@utx.skipIfMissingFeatures('LENNARD_JONES')
@ut.skipIf('LJ' not in modes, "Skipping test due to missing mode.")
def test_non_bonded_inter(self):
params1 = system.non_bonded_inter[
0, 0].lennard_jones._get_params_from_es_core()
params2 = system.non_bonded_inter[
3, 0].lennard_jones._get_params_from_es_core()
params1 = system.non_bonded_inter[0, 0].lennard_jones.get_params()
params2 = system.non_bonded_inter[3, 0].lennard_jones.get_params()
reference1 = {'shift': 0.1, 'sigma': 1.3, 'epsilon': 1.2,
'cutoff': 2.0, 'offset': 0.0, 'min': 0.0}
reference2 = {'shift': 0.1, 'sigma': 1.7, 'epsilon': 1.2,
Expand All @@ -294,13 +292,13 @@ def test_non_bonded_inter(self):
self.assertEqual(params2, reference2)

def test_bonded_inter(self):
state = system.part[1].bonds[0][0]._get_params_from_es_core()
state = system.part[1].bonds[0][0].params
reference = {'r_0': 0.0, 'k': 1.0, 'r_cut': 0.0}
self.assertEqual(state, reference)
state = system.part[1].bonds[0][0].params
self.assertEqual(state, reference)
if 'THERM.LB' not in modes:
state = system.part[1].bonds[1][0]._get_params_from_es_core()
state = system.part[1].bonds[1][0].params
reference = {'temp_com': 0., 'gamma_com': 0., 'temp_distance': 0.2,
'gamma_distance': 0.5, 'r_cut': 2.0, 'seed': 51}
self.assertEqual(state, reference)
Expand Down

0 comments on commit 8d28cfa

Please sign in to comment.