Exemple #1
0
 def test_1(self):
     """Formatlib: second test"""
     pdb_file = PDBFile(pdb_path=os.path.join(DIRNAME, 'test1.in'))
     pdb_file.pedantic_pdb()
     result = pdb_file.pdb_string
     f = open(os.path.join(DIRNAME, 'test1.out'))
     correct = f.read()
     f.close()
     self.assertEqual(correct, result)
Exemple #2
0
 def test_0(self):
     """Formatlib: first test"""
     tmpfile = os.path.join(tempdir or '/tmp/', str(uuid.uuid4()))
     shutil.copyfile(os.path.join(DIRNAME, 'test0.in'), tmpfile)
     pdb_file = PDBFile(pdb_path=tmpfile)
     pdb_file.pedantic_pdb()
     result = pdb_file.pdb_string
     os.remove(tmpfile)
     f = open(os.path.join(DIRNAME, 'test0.out'))
     correct = f.read()
     f.close()
     self.assertEqual(correct, result)