Ejemplo n.º 1
0
 def test_get_cnc(self):
     """Test get_cnc() function"""
     with utils.temporary_working_directory() as tmpdir:
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test.pdb'),
                     '1abc.pdb')
         res, num = bmi_feature_parser.get_cnc('1abc')
         self.assertEqual(len(res), 8)
         self.assertEqual(num, ('1', '1'))
Ejemplo n.º 2
0
 def test_get_cnc(self):
     """Test get_cnc() function"""
     with utils.temporary_working_directory() as tmpdir:
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test.pdb'),
                     '1abc.pdb')
         res, num = bmi_feature_parser.get_cnc('1abc')
         self.assertEqual(len(res), 8)
         self.assertEqual(num, ('1', '1'))
Ejemplo n.º 3
0
 def test_get_cnc_pockets(self):
     """Test get_cnc() parsing of pocket information"""
     with utils.temporary_working_directory() as tmpdir:
         os.mkdir('test_out')
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test_out.pdb'),
                     'test_out')
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test_info.txt'),
                     'test_out')
         with utils.mocked_object(subprocess, 'check_call', mock_check_call):
             res, num = bmi_feature_parser.get_cnc('test')
         self.assertAlmostEqual(res[('ALA', 2, 'A')], 0.0, places=1)
         self.assertAlmostEqual(res[('ALA', 1, 'A')], 0.8, places=1)
Ejemplo n.º 4
0
 def test_get_cnc_pockets(self):
     """Test get_cnc() parsing of pocket information"""
     with utils.temporary_working_directory() as tmpdir:
         os.mkdir('test_out')
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test_out.pdb'),
                     'test_out')
         shutil.copy(os.path.join(TOPDIR, 'test', 'input', 'test_info.txt'),
                     'test_out')
         with utils.mocked_object(subprocess, 'check_call',
                                  mock_check_call):
             res, num = bmi_feature_parser.get_cnc('test')
         self.assertAlmostEqual(res[('ALA', 2, 'A')], 0.0, places=1)
         self.assertAlmostEqual(res[('ALA', 1, 'A')], 0.8, places=1)