File new-pluggy.patch of Package python-pytest (Revision f213a27bb0b551d0feba19a4a1390029)
Currently displaying revision f213a27bb0b551d0feba19a4a1390029 , Show latest
xxxxxxxxxx
1
From a68f4fd2b9e99c82476d0e04ebcf561aeddbcb2e Mon Sep 17 00:00:00 2001
2
From: Bruno Oliveira <nicoddemus@gmail.com>
3
Date: Fri, 22 Feb 2019 18:49:56 -0300
4
Subject: [PATCH] Fix test failures after pluggy 1.8 release
5
6
pluggy now calls iter_entry_points with different arguments, and tests
7
which mocked that call need to be updated accordingly.
8
---
9
testing/test_assertion.py | 2 +-
10
testing/test_config.py | 14 +++++++-------
11
2 files changed, 8 insertions(+), 8 deletions(-)
12
13
Index: pytest-3.10.1/testing/test_assertion.py
14
===================================================================
15
--- pytest-3.10.1.orig/testing/test_assertion.py
16
+++ pytest-3.10.1/testing/test_assertion.py
17
18
import spamplugin
19
return spamplugin
20
21
- def iter_entry_points(name):
22
+ def iter_entry_points(group, name=None):
23
yield DummyEntryPoint()
24
25
pkg_resources.iter_entry_points = iter_entry_points
26
Index: pytest-3.10.1/testing/test_config.py
27
===================================================================
28
--- pytest-3.10.1.orig/testing/test_config.py
29
+++ pytest-3.10.1/testing/test_config.py
30
31
def test_preparse_ordering_with_setuptools(testdir, monkeypatch):
32
pkg_resources = pytest.importorskip("pkg_resources")
33
34
- def my_iter(name):
35
- assert name == "pytest11"
36
+ def my_iter(group, name=None):
37
+ assert group == "pytest11"
38
39
class Dist(object):
40
project_name = "spam"
41
42
def test_setuptools_importerror_issue1479(testdir, monkeypatch):
43
pkg_resources = pytest.importorskip("pkg_resources")
44
45
- def my_iter(name):
46
- assert name == "pytest11"
47
+ def my_iter(group, name=None):
48
+ assert group == "pytest11"
49
50
class Dist(object):
51
project_name = "spam"
52
53
54
plugin_module_placeholder = object()
55
56
- def my_iter(name):
57
- assert name == "pytest11"
58
+ def my_iter(group, name=None):
59
+ assert group == "pytest11"
60
61
class Dist(object):
62
project_name = "spam"
63
64
def test_disable_plugin_autoload(testdir, monkeypatch, parse_args, should_load):
65
pkg_resources = pytest.importorskip("pkg_resources")
66
67
- def my_iter(name):
68
+ def my_iter(group, name=None):
69
raise AssertionError("Should not be called")
70
71
class PseudoPlugin(object):
72