Author: bugman Date: Tue Nov 20 19:32:19 2007 New Revision: 3723 URL: http://svn.gna.org/viewcvs/relax?rev=3723&view=rev Log: Unit test for the modification of file paths by relax_io.get_file_path when a directory is supplied. Modified: 1.3/test_suite/unit_tests/test_relax_io.py Modified: 1.3/test_suite/unit_tests/test_relax_io.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/test_relax_io.py?rev=3723&r1=3722&r2=3723&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/test_relax_io.py (original) +++ 1.3/test_suite/unit_tests/test_relax_io.py Tue Nov 20 19:32:19 2007 @@ -43,3 +43,22 @@ self.assertEqual(relax_io.get_file_path(file1), file1) self.assertEqual(relax_io.get_file_path(file2), file2) self.assertEqual(relax_io.get_file_path(file3), file3) + + + def test_get_file_path_with_dir(self): + """The modification of file paths by relax_io.get_file_path when a directory is supplied.""" + + # Some file paths. + file1 = 'test' + file2 = 'test/aaa' + file3 = '/home/test/aaa' + + # Some directories. + dir1 = '/usr' + dir2 = 'usr' + dir3 = '/usr' + + # Check that nothing changes. + self.assertEqual(relax_io.get_file_path(file1, dir1), dir1+'/'+file1) + self.assertEqual(relax_io.get_file_path(file2, dir2), dir2+'/'+file2) + self.assertEqual(relax_io.get_file_path(file3, dir=dir3), dir3+'/'+file3)