1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-04-19 17:20:39 +01:00

N/A: Remove deprecated python 3.4 support + fix tests in 2.7 (#1025)

* N/A: Remove deprecated python 3.4 support

More details - https://www.python.org/downloads/release/python-3410/

* N/A: Remove Python 3.4 from appveyor config

* N/A: Fix UnicodeDecodeError with Python 2.7 and newer versions of py.test
This commit is contained in:
Vladimir Iakovlev 2019-12-16 21:55:19 +01:00 committed by GitHub
parent d10fc80fa5
commit 60073bea78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -12,7 +12,6 @@ matrix:
- python: "3.6-dev" - python: "3.6-dev"
- python: "3.6" - python: "3.6"
- python: "3.5" - python: "3.5"
- python: "3.4"
- python: "2.7" - python: "2.7"
- os: osx - os: osx
language: generic language: generic

View File

@ -3,7 +3,6 @@ build: false
environment: environment:
matrix: matrix:
- PYTHON: "C:/Python27" - PYTHON: "C:/Python27"
- PYTHON: "C:/Python34"
- PYTHON: "C:/Python35" - PYTHON: "C:/Python35"
- PYTHON: "C:/Python36" - PYTHON: "C:/Python36"
- PYTHON: "C:/Python37" - PYTHON: "C:/Python37"

View File

@ -26,8 +26,8 @@ if version < (2, 7):
print('thefuck requires Python version 2.7 or later' + print('thefuck requires Python version 2.7 or later' +
' ({}.{} detected).'.format(*version)) ' ({}.{} detected).'.format(*version))
sys.exit(-1) sys.exit(-1)
elif (3, 0) < version < (3, 4): elif (3, 0) < version < (3, 5):
print('thefuck requires Python version 3.4 or later' + print('thefuck requires Python version 3.5 or later' +
' ({}.{} detected).'.format(*version)) ' ({}.{} detected).'.format(*version))
sys.exit(-1) sys.exit(-1)

View File

@ -225,9 +225,12 @@ class TestGetValidHistoryWithoutCurrent(object):
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def history(self, mocker): def history(self, mocker):
return mocker.patch('thefuck.shells.shell.get_history', mock = mocker.patch('thefuck.shells.shell.get_history')
return_value=['le cat', 'fuck', 'ls cat', # Passing as an argument causes `UnicodeDecodeError`
'diff x', 'nocommand x', u'café ô']) # with newer py.test and python 2.7
mock.return_value = ['le cat', 'fuck', 'ls cat',
'diff x', 'nocommand x', u'café ô']
return mock
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def alias(self, mocker): def alias(self, mocker):

View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py27,py34,py35,py36,py37,py38 envlist = py27,py35,py36,py37,py38
[testenv] [testenv]
deps = -rrequirements.txt deps = -rrequirements.txt