@@ -202,7 +202,7 @@ def _callFUT(self, ob, **kwargs):
202
202
from zope .interface .ro import ro
203
203
return ro (ob , ** kwargs )
204
204
205
- def test_complex_diamond (self , base = object ):
205
+ def _make_complex_diamond (self , base ):
206
206
# https://github.com/zopefoundation/zope.interface/issues/21
207
207
O = base
208
208
class F (O ):
@@ -223,10 +223,13 @@ class A(B, C):
223
223
224
224
return A
225
225
226
+ def test_complex_diamond_object (self ):
227
+ self ._make_complex_diamond (object )
228
+
226
229
def test_complex_diamond_interface (self ):
227
230
from zope .interface import Interface
228
231
229
- IA = self .test_complex_diamond (Interface )
232
+ IA = self ._make_complex_diamond (Interface )
230
233
231
234
self .assertEqual (
232
235
[x .__name__ for x in IA .__iro__ ],
@@ -236,7 +239,7 @@ def test_complex_diamond_interface(self):
236
239
def test_complex_diamond_use_legacy_argument (self ):
237
240
from zope .interface import Interface
238
241
239
- A = self .test_complex_diamond (Interface )
242
+ A = self ._make_complex_diamond (Interface )
240
243
legacy_A_iro = self ._callFUT (A , use_legacy_ro = True )
241
244
self .assertNotEqual (A .__iro__ , legacy_A_iro )
242
245
@@ -246,7 +249,7 @@ def test_complex_diamond_use_legacy_argument(self):
246
249
def test_complex_diamond_compare_legacy_argument (self ):
247
250
from zope .interface import Interface
248
251
249
- A = self .test_complex_diamond (Interface )
252
+ A = self ._make_complex_diamond (Interface )
250
253
computed_A_iro = self ._callFUT (A , log_changed_ro = True )
251
254
# It matches, of course, but we did log a warning.
252
255
self .assertEqual (tuple (computed_A_iro ), A .__iro__ )
0 commit comments