Skip to content

Commit

Permalink
Add test of mmCIF file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Apr 13, 2018
1 parent ef5f1d5 commit 2a8679c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit 2a8679c

Please sign in to comment.