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_unittest.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_unittest.py')
-rw-r--r-- | testing/test_unittest.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/testing/test_unittest.py b/testing/test_unittest.py index bb41952ab..f310cd8cc 100644 --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -459,9 +459,6 @@ class TestTrialUnittest(object): pass """ ) - from _pytest.compat import _is_unittest_unexpected_success_a_failure - - should_fail = _is_unittest_unexpected_success_a_failure() result = testdir.runpytest("-rxs", *self.ignore_unclosed_socket_warning) result.stdout.fnmatch_lines_random( [ @@ -472,12 +469,10 @@ class TestTrialUnittest(object): "*i2wanto*", "*sys.version_info*", "*skip_in_method*", - "*1 failed*4 skipped*3 xfailed*" - if should_fail - else "*4 skipped*3 xfail*1 xpass*", + "*1 failed*4 skipped*3 xfailed*", ] ) - assert result.ret == (1 if should_fail else 0) + assert result.ret == 1 def test_trial_error(self, testdir): testdir.makepyfile( @@ -745,22 +740,17 @@ def test_unittest_expected_failure_for_passing_test_is_fail(testdir, runner): unittest.main() """ ) - from _pytest.compat import _is_unittest_unexpected_success_a_failure - should_fail = _is_unittest_unexpected_success_a_failure() if runner == "pytest": result = testdir.runpytest("-rxX") result.stdout.fnmatch_lines( - [ - "*MyTestCase*test_passing_test_is_fail*", - "*1 failed*" if should_fail else "*1 xpassed*", - ] + ["*MyTestCase*test_passing_test_is_fail*", "*1 failed*"] ) else: result = testdir.runpython(script) result.stderr.fnmatch_lines(["*1 test in*", "*(unexpected successes=1)*"]) - assert result.ret == (1 if should_fail else 0) + assert result.ret == 1 @pytest.mark.parametrize( |