From 0dbce7d50e35fa1ffed959a40f7c9a2aa6dda873 Mon Sep 17 00:00:00 2001
From: James Graham <j.graham@soton.ac.uk>
Date: Sat, 20 Feb 2021 19:54:37 +0000
Subject: [PATCH] fix: update tests to match refactoring in __main__

---
 test/test_pycgtool.py | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/test/test_pycgtool.py b/test/test_pycgtool.py
index d0e7db3..55eae22 100644
--- a/test/test_pycgtool.py
+++ b/test/test_pycgtool.py
@@ -68,7 +68,9 @@ class PycgtoolTest(unittest.TestCase):
                 'bnd': None,
             })
 
-            main.full_run(args)
+            # Equivalent to
+            # pycgtool <top> <trj> -m <map> --output-xtc
+            main.PyCGTOOL(args)
 
             self.assertTrue(
                 util.compare_trajectories(
@@ -81,7 +83,9 @@ class PycgtoolTest(unittest.TestCase):
             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(
@@ -103,7 +107,9 @@ class PycgtoolTest(unittest.TestCase):
                 '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())
 
@@ -121,7 +127,9 @@ class PycgtoolTest(unittest.TestCase):
                 '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())
@@ -145,7 +153,9 @@ class PycgtoolTest(unittest.TestCase):
                                 '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())
-- 
GitLab