From 2a8679c12e5172f6c087c89e34e22451ff8d14b9 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 13 Apr 2018 10:33:59 -0700 Subject: [PATCH] Add test of mmCIF file generation --- test/test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test.py b/test/test.py index 8a05bff..17800b3 100755 --- a/test/test.py +++ b/test/test.py @@ -66,6 +66,19 @@ def test_xray(self): os.chdir(os.path.join(TOPDIR, 'scripts')) self.run_imp_script('nup84.isd.modeling.withXrayInterface.py') + def test_mmcif(self): + """Test generation of mmCIF output""" + os.chdir(os.path.join(TOPDIR, 'scripts')) + if os.path.exists("nup84.cif"): + os.unlink("nup84.cif") + p = subprocess.check_call( + ["python", "nup84.isd.modeling.withXrayInterface.py", + "--mmcif", "--dry-run"]) + # Check size of output file + with open("nup84.cif") as fh: + wcl = len(fh.readlines()) + self.assertEqual(wcl, 55248) + def run_imp_script(self, script_name): """Run IMP modeling""" p = subprocess.check_call(["python", script_name, "--test"])