File tree 1 file changed +0
-27
lines changed 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -342,33 +342,6 @@ def pytest_configure():
342
342
_setup_django ()
343
343
344
344
345
- def _classmethod_is_defined_at_leaf (cls , method_name ):
346
- super_method = None
347
-
348
- for base_cls in cls .__mro__ [1 :]: # pragma: no branch
349
- super_method = base_cls .__dict__ .get (method_name )
350
- if super_method is not None :
351
- break
352
-
353
- assert super_method is not None , (
354
- "%s could not be found in base classes" % method_name
355
- )
356
-
357
- method = getattr (cls , method_name )
358
-
359
- try :
360
- f = method .__func__
361
- except AttributeError :
362
- pytest .fail ("%s.%s should be a classmethod" % (cls , method_name ))
363
- if PY2 and not (
364
- inspect .ismethod (method )
365
- and inspect .isclass (method .__self__ )
366
- and issubclass (cls , method .__self__ )
367
- ):
368
- pytest .fail ("%s.%s should be a classmethod" % (cls , method_name ))
369
- return f is not super_method .__func__
370
-
371
-
372
345
def pytest_collection_modifyitems (session , config , items ):
373
346
def get_order_number (test ):
374
347
marker_db = test .get_closest_marker ('django_db' )
You can’t perform that action at this time.
0 commit comments