changed test_pdist from os.system to entrypoint
@@ -2,6 +2,7 @@ import os
import shutil
from .h5diff import H5Diff
import unittest
+from westpa.cli.tools.w_pdist import entrypoint
class Test_W_PDIST(unittest.TestCase):
@@ -15,9 +16,13 @@ class Test_W_PDIST(unittest.TestCase):
ref_dir = os.path.join(os.path.dirname(__file__), 'refs')
shutil.copy2(os.path.join(ref_dir, 'west.cfg'), './')
shutil.copy2(os.path.join(ref_dir, 'west.h5'), './')
- os.system("w_pdist")
+
+ entrypoint()
+
assert os.path.isfile('./pdist.h5'), "The pdist.h5 file was not generated."
diff = H5Diff(os.path.join(ref_dir, 'pdist_ref.h5'), './pdist.h5')
diff.check()
+
+ # clean up
os.remove('west.h5')
os.remove('pdist.h5')
