Skip to content

Commit

Permalink
fix: update tests to match refactoring in __main__
Browse files Browse the repository at this point in the history
  • Loading branch information
jag1g13 committed Feb 20, 2021
1 parent 2992e1d commit 0dbce7d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions test/test_pycgtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def test_map_only(self):
'bnd': None,
})

main.full_run(args)
# Equivalent to
# pycgtool <top> <trj> -m <map> --output-xtc
main.PyCGTOOL(args)

self.assertTrue(
util.compare_trajectories(
Expand All @@ -81,7 +83,9 @@ def test_full(self):
tmp_path = pathlib.Path(tmpdir)
args = get_args('sugar', tmp_path)

main.full_run(args)
# Equivalent to
# pycgtool <top> <trj> -m <map> -b <bnd>
main.PyCGTOOL(args)

self.assertTrue(
util.cmp_file_whitespace_float(
Expand All @@ -103,7 +107,9 @@ def test_full_no_traj(self):
'trajectory': None,
})

main.full_run(args)
# Equivalent to
# pycgtool <top> -m <map> -b <bnd>
main.PyCGTOOL(args)

self.assertFalse(tmp_path.joinpath('out.itp').exists())

Expand All @@ -121,7 +127,9 @@ def test_measure_only(self):
'trajectory': None,
})

main.full_run(args)
# Equivalent to
# pycgtool <top> -b <bnd>
main.PyCGTOOL(args)

# Does not produce itp file
self.assertFalse(tmp_path.joinpath('out.itp').exists())
Expand All @@ -145,7 +153,9 @@ def test_forcefield(self):
'output_forcefield': True,
})

main.full_run(args)
# Equivalent to
# pycgtool <top> <trj> -m <map> -b <bnd> --output-forcefield
main.PyCGTOOL(args)

# Does not produce itp file
self.assertFalse(tmp_path.joinpath('out.itp').exists())
Expand Down

0 comments on commit 0dbce7d

Please sign in to comment.