Skip to content

Commit efbedff

Browse files
committed
ci, deps: no PY26, ddt>=1.1.1, CIs pip install test-requirements
+ Use environment-markers in requirement files (see http://stackoverflow.com/a/33451105/548792).
1 parent 4df1ec6 commit efbedff

8 files changed

+9
-18
lines changed

Diff for: .appveyor.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ install:
5151
conda info -a &
5252
conda install --yes --quiet pip
5353
)
54-
- pip install nose ddt wheel codecov
55-
- IF "%PYTHON_VERSION%" == "2.7" (
56-
pip install mock
57-
)
54+
- pip install -r test-requirements.txt
55+
- pip install codecov
5856

5957
## Copied from `init-tests-after-clone.sh`.
6058
#

Diff for: .travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
54
- "3.3"
65
- "3.4"
76
- "3.5"
87
# - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
9-
matrix:
10-
allow_failures:
11-
- python: "2.6"
128
git:
139
# a higher depth is needed for most of the tests - must be high enough to not actually be shallow
1410
# as we clone our own repository in the process
@@ -17,7 +13,8 @@ install:
1713
- python --version; git --version
1814
- git submodule update --init --recursive
1915
- git fetch --tags
20-
- pip install codecov flake8 ddt sphinx
16+
- pip install -r test-requirements.txt
17+
- pip install codecov sphinx
2118

2219
# generate some reflog as git-python tests need it (in master)
2320
- ./init-tests-after-clone.sh

Diff for: git/test/test_repo.py

-3
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,6 @@ def test_is_ancestor(self):
900900
for i, j in itertools.permutations([c1, 'ffffff', ''], r=2):
901901
self.assertRaises(GitCommandError, repo.is_ancestor, i, j)
902902

903-
# @skipIf(HIDE_WINDOWS_KNOWN_ERRORS,
904-
# "FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
905-
# "'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx") # noqa E501
906903
@with_rw_directory
907904
def test_work_tree_unsupported(self, rw_dir):
908905
git = Git(rw_dir)

Diff for: git/test/test_submodule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
730730
assert commit_sm.binsha == sm_too.binsha
731731
assert sm_too.binsha != sm.binsha
732732

733-
# @skipIf(HIDE_WINDOWS_KNOWN_ERRORS,
733+
# @skipIf(HIDE_WINDOWS_KNOWN_ERRORS, ## ACTUALLY skipped by `git.submodule.base#L869`.
734734
# "FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
735735
# "'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx") # noqa E501
736736
@with_rw_directory

Diff for: git/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#: so the errors marked with this var are considered "acknowledged" ones, awaiting remedy,
5757
#: till then, we wish to hide them.
5858
HIDE_WINDOWS_KNOWN_ERRORS = is_win and os.environ.get('HIDE_WINDOWS_KNOWN_ERRORS', True)
59-
HIDE_WINDOWS_FREEZE_ERRORS = is_win and os.environ.get('HIDE_WINDOWS_FREEZE_ERRORS', HIDE_WINDOWS_KNOWN_ERRORS)
59+
HIDE_WINDOWS_FREEZE_ERRORS = is_win and os.environ.get('HIDE_WINDOWS_FREEZE_ERRORS', True)
6060

6161
#{ Utility Methods
6262

Diff for: requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
gitdb>=0.6.4
2-
ddt
3-
mock
2+
ddt>=1.1.1

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _stamp_version(filename):
6868
extras_require = {
6969
':python_version == "2.6"': ['ordereddict'],
7070
}
71-
test_requires = ['ddt']
71+
test_requires = ['ddt>=1.1.1']
7272
if sys.version_info[:2] < (2, 7):
7373
test_requires.append('mock')
7474

Diff for: test-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
coverage
44
flake8
55
nose
6-
mock
6+
mock; python_version<='2.7'

0 commit comments

Comments
 (0)