summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-07-25 18:12:05 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-07-25 18:28:21 -0700
commit752f7623643670de40a66011906b69da6087f1c0 (patch)
tree5a934b40e9cd2b006c134b3acf380897bf4f42db /dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch
parentdev-python/pluggy: bump to 0.12.0 (diff)
downloadgentoo-752f7623643670de40a66011906b69da6087f1c0.tar.gz
gentoo-752f7623643670de40a66011906b69da6087f1c0.tar.bz2
gentoo-752f7623643670de40a66011906b69da6087f1c0.zip
dev-python/pytest: bump to 5.0.1
had to drop a lot of keywords: alpha amd64-fbsd amd64-linux arm arm64 hppa ia64 mips ppc ppc64 s390 sparc sparc-solaris sparc64-solaris x64-solaris x86-linux x86-solaris testsute passes 2346 passed, 50 skipped, 11 xfailed, 1 warnings Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch')
-rw-r--r--dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch b/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch
new file mode 100644
index 000000000000..5c6154cd92c0
--- /dev/null
+++ b/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch
@@ -0,0 +1,38 @@
+From ab39502c98f40c03a2956dcf6c6b9daf5ee41a63 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Fri, 26 Jul 2019 02:23:14 +0200
+Subject: [PATCH] In test_xfail_handling, only remove __pycache__ if it exists
+
+Previously, the test failed when the directory was not present,
+which could have been caused for example by invoking the tests
+with PYTHONDONTWRITEBYTECODE=1.
+
+Fixes https://github.com/pytest-dev/pytest/issues/5664
+---
+ changelog/5664.trivial.rst | 2 ++
+ testing/test_stepwise.py | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+ create mode 100644 changelog/5664.trivial.rst
+
+diff --git a/changelog/5664.trivial.rst b/changelog/5664.trivial.rst
+new file mode 100644
+index 000000000..3928454ef
+--- /dev/null
++++ b/changelog/5664.trivial.rst
+@@ -0,0 +1,2 @@
++When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``,
++the ``test_xfail_handling`` test no longer fails.
+diff --git a/testing/test_stepwise.py b/testing/test_stepwise.py
+index 591d67b6c..f61425b6b 100644
+--- a/testing/test_stepwise.py
++++ b/testing/test_stepwise.py
+@@ -207,7 +207,8 @@ def test_d(): pass
+
+ # because we are writing to the same file, mtime might not be affected enough to
+ # invalidate the cache, making this next run flaky
+- testdir.tmpdir.join("__pycache__").remove()
++ if testdir.tmpdir.join("__pycache__").exists():
++ testdir.tmpdir.join("__pycache__").remove()
+ testdir.makepyfile(contents.format(assert_value="0", strict="True"))
+ result = testdir.runpytest("--sw", "-v")
+ result.stdout.fnmatch_lines(