def test_clone_no_write_permissions(self): base_dir = _os.path.join(type(self)._repos_dir, 'test-no-write') ShellHelper.make_dir(base_dir) _os.chmod(base_dir, _os.stat(base_dir).st_mode & ~(_stat.S_IWUSR)) with self.assertRaisesRegexp(GitWrapperError, r'^Command \'git clone -b .*\' failed$'): self._git_wrapper_clone_helper(base_dir, type(self)._origin_repo, 'master', 'test-clone', remove_base_dir=True) return
def test_clone_no_write_permissions(self): base_dir = _os.path.join( type(self)._repos_dir, 'test-no-write') ShellHelper.make_dir(base_dir) _os.chmod(base_dir, _os.stat(base_dir).st_mode & ~(_stat.S_IWUSR)) with self.assertRaisesRegexp( GitWrapperError, r'^Command \'git clone -b .*\' failed$'): self._git_wrapper_clone_helper( base_dir, type(self)._origin_repo, 'master', 'test-clone', remove_base_dir=True) return
def __init__(self, base_test_dir): if not _os.path.isdir(base_test_dir): ShellHelper.make_dir(base_test_dir) GitWrapperTestCase.set_base_dir(base_test_dir) return