示例#1
0
 def test_returns_all_components_for_long_pathname(self):
     self.assertEqual(
         obnamlib.split_pathname('/usr/share/doc'),
         ['/', 'usr', 'share', 'doc'])
示例#2
0
 def test_returns_dir_for_relative_dir(self):
     self.assertEqual(obnamlib.split_pathname('bin'), ['bin'])
示例#3
0
 def test_returns_root_and_dir_for_slash_bin_slash(self):
     self.assertEqual(obnamlib.split_pathname('/bin/'), ['/', 'bin'])
示例#4
0
 def test_returns_rootdir_for_rootdir(self):
     self.assertEqual(obnamlib.split_pathname('/'), ['/'])