Beispiel #1
0
 def _process_ignores_in_parent_dirs(self, wdir):
     if self.ignore_file_handler:
         wdir = os.path.normpath(os.path.abspath(wdir))
         ignore_search_end_dir = self.ignore_file_handler.get_repo_root()
         parent_dirs = get_parent_dirs_up_to(wdir, ignore_search_end_dir)
         for d in parent_dirs:
             self.update(d)
Beispiel #2
0
def test_get_parent_dirs_up_to(path1, path2, expected_dirs):
    result = get_parent_dirs_up_to(path1, path2)

    assert set(result) == set(expected_dirs)
Beispiel #3
0
def test_get_parent_dirs_up_to_should_raise_on_no_absolute(path1, path2):
    with pytest.raises(AssertionError):
        get_parent_dirs_up_to(path1, path2)