示例#1
0
文件: test_uri.py 项目: zendbit/peppy
 def test7(self):
     a = Path('a/b/')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'a/b/')
     self.assertEqual(a.get_pathtoroot(), u'../')
示例#2
0
文件: test_uri.py 项目: zendbit/peppy
 def test3(self):
     a = Path('/a/b')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'/a/b')
     self.assertEqual(a.get_pathtoroot(), u'../')
示例#3
0
文件: test_uri.py 项目: zendbit/peppy
 def test5(self):
     a = Path('/a/very/long/path')
     self.assertEqual(a.get_pathtoroot(), '../../../')
     a = Path(u'/a/very/long/path')
     self.assertEqual(a.get_pathtoroot(), u'../../../')
示例#4
0
文件: test_uri.py 项目: zendbit/peppy
 def test2(self):
     a = Path('/a/')
     self.assertEqual(a.get_pathtoroot(), '')
     a = Path(u'/a/')
     self.assertEqual(a.get_pathtoroot(), u'')
示例#5
0
 def test7(self):
     a = Path('a/b/')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'a/b/')
     self.assertEqual(a.get_pathtoroot(), u'../')
示例#6
0
 def test5(self):
     a = Path('/a/very/long/path')
     self.assertEqual(a.get_pathtoroot(), '../../../')
     a = Path(u'/a/very/long/path')
     self.assertEqual(a.get_pathtoroot(), u'../../../')
示例#7
0
 def test3(self):
     a = Path('/a/b')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'/a/b')
     self.assertEqual(a.get_pathtoroot(), u'../')
示例#8
0
 def test2(self):
     a = Path('/a/')
     self.assertEqual(a.get_pathtoroot(), '')
     a = Path(u'/a/')
     self.assertEqual(a.get_pathtoroot(), u'')