def test__main_file_and_cwd_in_different_subdirs(self): os.chdir(self.subdir.as_posix()) check_file_under_version_control(file_path="deepersubdir/bar", working_copy=self.wc)
def test__main_file_abs_path(self): os.chdir(self.wc_dir.as_posix()) check_file_under_version_control(file_path=(self.wc_dir / "my_main_file").absolute(), working_copy=self.wc)
def test__main_file_abs_path(self): os.chdir(self.wc_dir.as_posix()) check_file_under_version_control(file_path=(self.wc_dir / "my_main_file").absolute(), working_copy=self.wc)
def test__main_file_in_subdir_cwd_in_wc_root(self): os.chdir(self.wc_dir.as_posix()) check_file_under_version_control(file_path="subdir/foo", working_copy=self.wc)
def test__main_file_and_cwd_in_different_subdirs(self): os.chdir(self.subdir.as_posix()) check_file_under_version_control(file_path="deepersubdir/bar", working_copy=self.wc)
def test__main_file_in_subdir_cwd_in_wc_root(self): os.chdir(self.wc_dir.as_posix()) check_file_under_version_control(file_path="subdir/foo", working_copy=self.wc)
def test__main_file_in_wc_root_cwd_in_subdir(self): with patch(os, "getcwd", lambda: "/path/to/sumatra/project/subdir"): check_file_under_version_control("../my_main_file", MockWorkingCopy("/path/to/sumatra/project"))
def test__main_file_abs_path(self): with patch(os, "getcwd", lambda: "/path/to/sumatra/project"): check_file_under_version_control("/path/to/sumatra/project/my_main_file", MockWorkingCopy("/path/to/sumatra/project"))
def test__main_file_and_cwd_in_different_subdirs(self): with patch(os, "getcwd", lambda: "/path/to/sumatra/project/subdir"): check_file_under_version_control("deepersubdir/bar", MockWorkingCopy("/path/to/sumatra/project"))