Author: bugman Date: Fri Sep 26 18:05:51 2008 New Revision: 7357 URL: http://svn.gna.org/viewcvs/relax?rev=7357&view=rev Log: Fixed the test_load_pdb() unit test. Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py Modified: 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py?rev=7357&r1=7356&r2=7357&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py (original) +++ 1.3/test_suite/unit_tests/_generic_fns/_structure/test_internal.py Fri Sep 26 18:05:51 2008 @@ -21,8 +21,9 @@ ############################################################################### # Python module imports. +from numpy import fromstring +from os import path import sys -from numpy import fromstring from unittest import TestCase # relax module imports. @@ -44,6 +45,10 @@ # The path to a PDB file. self.test_pdb_path = self.path+'/test_suite/shared_data/structures/Ap4Aase_res1-12.pdb' + expanded = path.split(self.test_pdb_path) + self.test_pdb_dir = expanded[0] + self.test_pdb_file_name = expanded[1] + # Instantiate the structural data object. self.data = Internal() @@ -205,8 +210,9 @@ self.data.load_pdb(self.test_pdb_path) # Test the structural data. - self.assertEqual(len(self.data.file_name), 1) - self.assertEqual(self.data.file_name[0], self.test_pdb_path) + self.assertEqual(len(self.data.file), 1) + self.assertEqual(self.data.file[0], self.test_pdb_file_name) + self.assertEqual(self.data.path[0], self.test_pdb_dir) self.assertEqual(len(self.data.structural_data), 1) self.assertEqual(type(self.data.structural_data), list) self.assertEqual(self.data.structural_data[0].model, 1)