def test_absolute_path_subdir_does_not_contain(self): "Test absolute path subdir does not contain different path." self.assertFalse(path_subdir_contains(other_abs_path, abs_path)) self.assertFalse(path_subdir_contains(other_abs_path, abs_path_to)) self.assertFalse( path_subdir_contains(other_abs_path, abs_path_to_somewhere)) self.assertFalse(path_subdir_contains(abs_path, other_abs_path)) self.assertFalse(path_subdir_contains(abs_path_to, other_abs_path)) self.assertFalse( path_subdir_contains(abs_path_to_somewhere, other_abs_path))
def test_relative_path_subdir_does_not_contain(self): "Test relative path subdir does not contain different path." self.assertFalse(path_subdir_contains(other_rel_path, rel_path)) self.assertFalse(path_subdir_contains(other_rel_path, rel_path_to)) self.assertFalse( path_subdir_contains(other_rel_path, rel_path_to_somewhere)) self.assertFalse(path_subdir_contains(rel_path, other_rel_path)) self.assertFalse(path_subdir_contains(rel_path_to, other_rel_path)) self.assertFalse( path_subdir_contains(rel_path_to_somewhere, other_rel_path))
def test_absolute_path_item_in_dir_not_in_subdir(self): "Test absolute path item in directory but not in subdirectory." self.assertFalse(path_subdir_contains(abs_path, abs_path_to)) self.assertFalse(path_subdir_contains(abs_path, str(abs_path_to)))
def test_absolute_path_subdir_contains_str(self): "Test absolute path subdir contains another string path." self.assertTrue( path_subdir_contains(abs_path, str(abs_path_to_somewhere))) self.assertTrue( path_subdir_contains(abs_path, str(abs_path_to_nowhere)))
def test_relative_path_subdir_does_not_contain_absolute(self): "Test relative path subdir does not contain absolute path." self.assertFalse(path_subdir_contains(rel_path, abs_path_to_somewhere)) self.assertFalse( path_subdir_contains(rel_path, Path('/') / rel_path_to_somewhere))
def test_relative_path_item_in_dir_not_in_subdir(self): "Test relative path item in directory but not in subdirectory." self.assertFalse(path_subdir_contains(rel_path, rel_path_to)) self.assertFalse(path_subdir_contains(rel_path, str(rel_path_to)))
def test_relative_path_subdir_contains_str(self): "Test relative path subdir contains another string path." self.assertTrue( path_subdir_contains(rel_path, str(rel_path_to_somewhere))) self.assertTrue( path_subdir_contains(rel_path, str(rel_path_to_nowhere)))
def test_absolute_path_subdir_does_not_contain_relative(self): "Test absolute path subdir does not contain relative path." self.assertFalse(path_subdir_contains(abs_path, rel_path_to_somewhere)) self.assertFalse( path_subdir_contains(abs_path, str(abs_path_to_somewhere)[1:]))