예제 #1
0
파일: test_utils.py 프로젝트: sornas/alot
 def test_both_paths_absolute_matching(self):
     superpath = '/a/b'
     subpath = '/a/b/c/d.rst'
     result = utils.is_subdir_of(subpath, superpath)
     self.assertTrue(result)
예제 #2
0
파일: test_utils.py 프로젝트: sornas/alot
 def test_both_paths_relative_not_matching(self):
     superpath = 'a/z'
     subpath = 'a/b/c/d.rst'
     result = utils.is_subdir_of(subpath, superpath)
     self.assertFalse(result)
예제 #3
0
파일: test_utils.py 프로젝트: sornas/alot
 def test_relative_path_and_absolute_path_matching(self):
     superpath = 'a/b'
     subpath = os.path.join(os.getcwd(), 'a/b/c/d.rst')
     result = utils.is_subdir_of(subpath, superpath)
     self.assertTrue(result)