def test_egg_import(self): from gf.rejuice.config import get_filepath_path result = get_filepath_path('/This/a2.ini', 'egg:my.package1/Else/static', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path1/Else/static') result = get_filepath_path('/This/a2.ini', 'egg:my.package1', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path1') result = get_filepath_path('/This/a2.ini', 'egg:my.package2/Else/static', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path2/Else/static') result = get_filepath_path('/This/a2.ini', 'egg:my.package2', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path2') result = get_filepath_path('/This/a2.ini', 'egg:my.package3/Else/static', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path3/Else/static') result = get_filepath_path('/This/a2.ini', 'egg:my.package3', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This/path3')
def test_null_path(self): from gf.rejuice.config import get_filepath_path result = get_filepath_path('/This/a2.ini', '', error_info='ERROR_INFO', modules=self.fake_modules) self.assertEqual(result, '/This')