@@ -133,18 +133,36 @@ def load(self):
133
133
@attr .s
134
134
class DummyDist :
135
135
entry_points = attr .ib ()
136
+ metadata = {"name" : "mpyproject" }
136
137
files = ()
137
138
138
139
def my_dists ():
139
140
return (DummyDist (entry_points ),)
140
141
141
142
monkeypatch .setattr (importlib_metadata , "distributions" , my_dists )
142
143
params = ("-p" , "mycov" ) if load_cov_early else ()
143
- testdir .runpytest_inprocess ( * params )
144
+ result = testdir .runpytest ( "--version" , * params )
144
145
if load_cov_early :
145
146
assert loaded == ["mycov" , "myplugin1" , "myplugin2" ]
147
+ result .stderr .fnmatch_lines (
148
+ [
149
+ "setuptools registered plugins:" ,
150
+ " mpyproject-None at */mycov_module.py" ,
151
+ " mpyproject-None at */mytestplugin1_module.py" ,
152
+ " mpyproject-None at */mytestplugin2_module.py" ,
153
+ ]
154
+ )
146
155
else :
147
156
assert loaded == ["myplugin1" , "myplugin2" , "mycov" ]
157
+ result .stderr .fnmatch_lines (
158
+ [
159
+ "setuptools registered plugins:" ,
160
+ " mpyproject-None at */mytestplugin1_module.py" ,
161
+ " mpyproject-None at */mytestplugin2_module.py" ,
162
+ " mpyproject-None at */mycov_module.py" ,
163
+ ]
164
+ )
165
+ assert result .ret == 0
148
166
149
167
def test_assertion_magic (self , testdir ):
150
168
p = testdir .makepyfile (
0 commit comments