diff --git a/.travis.yml b/.travis.yml index 1e0459a..cb4679c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ env: - secure: AifoKzwhjV94cmcQZrdQmqRu/9rkZZvWpwBv1daeAQpLOKFPGsOm3D+x2cSw9+iCfkgDZDfqQVv1kCaFVxTll8v8jTq5SJdqEY0NmGWbj/UkNtShh609oRDsuzLxAEwtVKYjf/h8K2BRea+bl1tGkwZ2vtmYS6dxNlAijjWOfds= - secure: LBSEg/gMj4u4Hrpo3zs6Y/1mTpd2RtcN49mZIFgTdbJ9IhpiNPqcEt647Lz94F9Eses2x2WbNuKqZKZZReY7QLbEzU1m0nN5jlaKrjcG5NR5clNABfFFyhgc0jBikyS4abAG8jc2efeaTrFuQwdoF4sE8YiVrkiVj2X5Xoi6sBk= matrix: - - WITH_LIB="requests2.x" + - WITH_LIB="requests2.2" + - WITH_LIB="requests2.3" - WITH_LIB="requests1.x" - WITH_LIB="httplib2" - WITH_LIB="boto" @@ -15,15 +16,21 @@ matrix: exclude: - env: WITH_LIB="boto" python: 3.3 + - env: WITH_LIB="boto" + python: 3.4 + - env: WITH_LIB="requests1.x" + python: 3.4 python: - 2.6 - 2.7 - 3.3 +- 3.4 - pypy install: - pip install PyYAML pytest pytest-localserver --use-mirrors - if [ $WITH_LIB = "requests1.x" ] ; then pip install requests==1.2.3; fi -- if [ $WITH_LIB = "requests2.x" ] ; then pip install requests; fi +- if [ $WITH_LIB = "requests2.2" ] ; then pip install requests==2.2.1; fi +- if [ $WITH_LIB = "requests2.3" ] ; then pip install requests==2.3.0; fi - if [ $WITH_LIB = "httplib2" ] ; then pip install httplib2; fi - if [ $WITH_LIB = "boto" ] ; then pip install boto; fi script: python setup.py test diff --git a/tox.ini b/tox.ini index e3a1e2a..3228022 100644 --- a/tox.ini +++ b/tox.ini @@ -10,15 +10,18 @@ envlist = py33, py34, pypy, - py26requests, - py27requests, - py34requests, - pypyrequests, - py26oldrequests, - py27oldrequests, - py33oldrequests, - py34oldrequests, - pypyoldrequests, + py26requests23, + py27requests23, + py34requests23, + pypyrequests23, + py26requests22, + py27requests22, + py34requests22, + pypyrequests22, + py26requests1, + py27requests1, + py33requests1, + pypyrequests1, py26httplib2, py27httplib2, py33httplib2, @@ -34,7 +37,7 @@ deps = pytest-localserver PyYAML -[testenv:py26oldrequests] +[testenv:py26requests1] basepython = python2.6 deps = mock @@ -43,7 +46,7 @@ deps = PyYAML requests==1.2.3 -[testenv:py27oldrequests] +[testenv:py27requests1] basepython = python2.7 deps = mock @@ -52,7 +55,7 @@ deps = PyYAML requests==1.2.3 -[testenv:py33oldrequests] +[testenv:py33requests1] basepython = python3.3 deps = mock @@ -61,16 +64,7 @@ deps = PyYAML requests==1.2.3 -[testenv:py34oldrequests] -basepython = python3.4 -deps = - mock - pytest - pytest-localserver - PyYAML - requests==1.2.3 - -[testenv:pypyoldrequests] +[testenv:pypyrequests1] basepython = pypy deps = mock @@ -79,50 +73,95 @@ deps = PyYAML requests==1.2.3 -[testenv:py26requests] +[testenv:py26requests23] basepython = python2.6 deps = mock pytest pytest-localserver PyYAML - requests + requests==2.3.0 -[testenv:py27requests] +[testenv:py27requests23] basepython = python2.7 deps = mock pytest pytest-localserver PyYAML - requests + requests==2.3.0 -[testenv:py33requests] +[testenv:py33requests23] basepython = python3.4 deps = mock pytest pytest-localserver PyYAML - requests + requests==2.3.0 -[testenv:py34requests] +[testenv:py34requests23] basepython = python3.4 deps = mock pytest pytest-localserver PyYAML - requests + requests==2.3.0 -[testenv:pypyrequests] +[testenv:pypyrequests23] basepython = pypy deps = mock pytest pytest-localserver PyYAML - requests + requests==2.3.0 + +[testenv:py26requests22] +basepython = python2.6 +deps = + mock + pytest + pytest-localserver + PyYAML + requests==2.2.1 + +[testenv:py27requests22] +basepython = python2.7 +deps = + mock + pytest + pytest-localserver + PyYAML + requests==2.2.1 + +[testenv:py33requests22] +basepython = python3.4 +deps = + mock + pytest + pytest-localserver + PyYAML + requests==2.2.1 + +[testenv:py34requests22] +basepython = python3.4 +deps = + mock + pytest + pytest-localserver + PyYAML + requests==2.2.1 + +[testenv:pypyrequests22] +basepython = pypy +deps = + mock + pytest + pytest-localserver + PyYAML + requests==2.2.1 [testenv:py26httplib2] basepython = python2.6 diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index 3376b3c..33c0fef 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -285,6 +285,9 @@ class VCRConnection: self.real_connection.sock = value def __init__(self, *args, **kwargs): + if six.PY3: + kwargs.pop('strict', None) # apparently this is gone in py3 + # need to temporarily reset here because the real connection # inherits from the thing that we are mocking out. Take out # the reset if you want to see what I mean :)