diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-16 12:16:01 -0600 |
---|---|---|
committer | Harmon <Harmon758@gmail.com> | 2020-02-16 12:16:01 -0600 |
commit | 87abade91f84880e991eaed7ed67b1d6f6b03e17 (patch) | |
tree | 2884c430cee37af98405ed7cefc768d99f1900a3 /git/test/test_repo.py | |
parent | b17a76731c06c904c505951af24ff4d059ccd975 (diff) | |
download | gitpython-87abade91f84880e991eaed7ed67b1d6f6b03e17.tar.gz |
Remove checks for pathlib existence in TestRepo for Python < 3.4
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index af784b17..f27521a8 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -9,15 +9,11 @@ import io from io import BytesIO import itertools import os +import pathlib import pickle import tempfile from unittest import skipIf, SkipTest -try: - import pathlib -except ImportError: - pathlib = None - from git import ( InvalidGitRepositoryError, Repo, @@ -105,9 +101,6 @@ class TestRepo(TestBase): @with_rw_repo('0.3.2.1') def test_repo_creation_pathlib(self, rw_repo): - if pathlib is None: # pythons bellow 3.4 don't have pathlib - raise SkipTest("pathlib was introduced in 3.4") - r_from_gitdir = Repo(pathlib.Path(rw_repo.git_dir)) self.assertEqual(r_from_gitdir.git_dir, rw_repo.git_dir) @@ -221,18 +214,12 @@ class TestRepo(TestBase): @with_rw_directory def test_clone_from_pathlib(self, rw_dir): - if pathlib is None: # pythons bellow 3.4 don't have pathlib - raise SkipTest("pathlib was introduced in 3.4") - original_repo = Repo.init(osp.join(rw_dir, "repo")) Repo.clone_from(original_repo.git_dir, pathlib.Path(rw_dir) / "clone_pathlib") @with_rw_directory def test_clone_from_pathlib_withConfig(self, rw_dir): - if pathlib is None: # pythons bellow 3.4 don't have pathlib - raise SkipTest("pathlib was introduced in 3.4") - original_repo = Repo.init(osp.join(rw_dir, "repo")) cloned = Repo.clone_from(original_repo.git_dir, pathlib.Path(rw_dir) / "clone_pathlib_withConfig", |