Exemple #1
0
 def test7(self):
     a = Path('a/b/')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'a/b/')
     self.assertEqual(a.get_pathtoroot(), u'../')
Exemple #2
0
 def test3(self):
     a = Path('/a/b')
     self.assertEqual(a.get_pathtoroot(), '../')
     a = Path(u'/a/b')
     self.assertEqual(a.get_pathtoroot(), u'../')
Exemple #3
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'../../../')
Exemple #4
0
 def test2(self):
     a = Path('/a/')
     self.assertEqual(a.get_pathtoroot(), '')
     a = Path(u'/a/')
     self.assertEqual(a.get_pathtoroot(), u'')
Exemple #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'../')
Exemple #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'../../../')
Exemple #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'../')
Exemple #8
0
 def test2(self):
     a = Path('/a/')
     self.assertEqual(a.get_pathtoroot(), '')
     a = Path(u'/a/')
     self.assertEqual(a.get_pathtoroot(), u'')