Skip to content

Commit a506a1c

Browse files
committed
Simplify cross version tests
1 parent c5030c8 commit a506a1c

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ matrix:
1616
install: pip install coveralls tox
1717
script: tox
1818
before_install:
19-
# work around https://github.com/travis-ci/travis-ci/issues/8363
20-
- which python3.5 || (pyenv install 3.5.4 && pyenv global system 3.5.4)
2119
- git --version
2220
- |
2321
if [ "$LATEST_GIT" = "1" ]; then

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
- The complete test suite depends on having at least the following installed (possibly not
66
a complete list)
77
- git (A sufficiently newer version is required to run pre-push tests)
8-
- python
9-
- python3.4 (Required by a test which checks different python versions)
10-
- python3.5 (Required by a test which checks different python versions)
8+
- python2 (Required by a test which checks different python versions)
9+
- python3 (Required by a test which checks different python versions)
1110
- tox (or virtualenv)
1211
- ruby + gem
1312
- docker

testing/resources/arbitrary_bytes_repo/.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
name: Python 3 Hook
33
entry: python3-hook
44
language: python
5-
language_version: python3.5
5+
language_version: python3
66
files: \.py$

testing/resources/python3_hooks_repo/.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
name: Python 3 Hook
33
entry: python3-hook
44
language: python
5-
language_version: python3.5
5+
language_version: python3
66
files: \.py$

testing/resources/python3_hooks_repo/python3_hook/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def func():
7-
print('{}.{}'.format(*sys.version_info[:2]))
7+
print(sys.version_info[0])
88
print(repr(sys.argv[1:]))
99
print('Hello World')
1010
return 0

tests/repository_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def run_on_version(version, expected_output):
130130
assert ret[0] == 0
131131
assert _norm_out(ret[1]) == expected_output
132132

133-
run_on_version('python3.4', b'3.4\n[]\nHello World\n')
134-
run_on_version('python3.5', b'3.5\n[]\nHello World\n')
133+
run_on_version('python2', b'2\n[]\nHello World\n')
134+
run_on_version('python3', b'3\n[]\nHello World\n')
135135

136136

137137
@pytest.mark.integration
@@ -140,7 +140,7 @@ def test_versioned_python_hook(tempdir_factory, store):
140140
tempdir_factory, store, 'python3_hooks_repo',
141141
'python3-hook',
142142
[os.devnull],
143-
b"3.5\n['" + five.to_bytes(os.devnull) + b"']\nHello World\n",
143+
b"3\n['" + five.to_bytes(os.devnull) + b"']\nHello World\n",
144144
)
145145

146146

0 commit comments

Comments
 (0)