コード例 #1
0
ファイル: test_path.py プロジェクト: AbletonAG/abl.vpath
 def test_dirname(self):
     pth = URI("/this/is/a/path")
     self.assertEqual(pth.dirname(), URI("/this/is/a"))
     self.assertEqual(pth.dirname(level=2), URI("/this/is"))
     self.assertEqual(pth.dirname(level=3), URI("/this"))
     self.assertEqual(pth.dirname(level=4), URI("/"))
     self.assertEqual(pth.dirname(level=5), URI("/"))
コード例 #2
0
ファイル: test_path.py プロジェクト: AbletonAG/abl.vpath
 def test_dirname(self):
     pth = URI("/this/is/a/path")
     self.assertEqual(pth.dirname(), URI("/this/is/a"))
     self.assertEqual(pth.dirname(level=2), URI("/this/is"))
     self.assertEqual(pth.dirname(level=3), URI("/this"))
     self.assertEqual(pth.dirname(level=4), URI("/"))
     self.assertEqual(pth.dirname(level=5), URI("/"))
コード例 #3
0
ファイル: test_memory.py プロジェクト: AbletonAG/abl.vpath
 def test_root_of_non_existing_dir_exists(self):
     dir_path = URI("memory:///foo")
     assert dir_path.dirname().exists()
コード例 #4
0
 def test_root_of_non_existing_dir_exists(self):
     dir_path = URI("memory:///foo")
     assert dir_path.dirname().exists()