diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2019-05-27 20:31:52 -0300 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2019-06-02 14:39:11 -0300 |
commit | 4d49ba65297102110ae8aeecdb3b82b23a231fba (patch) | |
tree | 10a917331db131a6728775ff7d462732ff1f9466 /testing/test_monkeypatch.py | |
parent | 733f43b02eafe2934c2e86b7d0370e25dfe95a48 (diff) | |
download | pytest-4d49ba65297102110ae8aeecdb3b82b23a231fba.tar.gz |
Drop Python 2.7 and 3.4 support
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
Diffstat (limited to 'testing/test_monkeypatch.py')
-rw-r--r-- | testing/test_monkeypatch.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/testing/test_monkeypatch.py b/testing/test_monkeypatch.py index 9b2f45502..279b0c4a4 100644 --- a/testing/test_monkeypatch.py +++ b/testing/test_monkeypatch.py @@ -8,8 +8,6 @@ import re import sys import textwrap -import six - import pytest from _pytest.monkeypatch import MonkeyPatch @@ -209,22 +207,6 @@ class TestEnvironWarnings(object): VAR_NAME = u"PYTEST_INTERNAL_MY_VAR" - @pytest.mark.skipif(six.PY3, reason="Python 2 only test") - def test_setenv_unicode_key(self, monkeypatch): - with pytest.warns( - pytest.PytestWarning, - match="Environment variable name {!r} should be str".format(self.VAR_NAME), - ): - monkeypatch.setenv(self.VAR_NAME, "2") - - @pytest.mark.skipif(six.PY3, reason="Python 2 only test") - def test_delenv_unicode_key(self, monkeypatch): - with pytest.warns( - pytest.PytestWarning, - match="Environment variable name {!r} should be str".format(self.VAR_NAME), - ): - monkeypatch.delenv(self.VAR_NAME, raising=False) - def test_setenv_non_str_warning(self, monkeypatch): value = 2 msg = ( @@ -349,10 +331,8 @@ def test_importerror(testdir): result = testdir.runpytest() result.stdout.fnmatch_lines( """ - *import error in package.a: No module named {0}doesnotexist{0}* - """.format( - "'" if sys.version_info > (3, 0) else "" - ) + *import error in package.a: No module named 'doesnotexist'* + """ ) |