Page MenuHomePhabricator

MetaTestCaseClass.__new__ should test if test_X attributes are actually functions
Open, Needs TriagePublic

Description

class LiveRCPageGeneratorTestCase(WikimediaDefaultSiteTestCase):
    test_length = 10

results in

  File "./tests/pagegenerators_tests.py", line 487, in <module>
    class LiveRCPageGeneratorTestCase(WikimediaDefaultSiteTestCase):
  File "/home/valhallasw/src/pywikibot-core/tests/aspects.py", line 695, in __new__
    if test_func.__code__.co_argcount == 0:
AttributeError: 'int' object has no attribute '__code__'

Event Timeline

valhallasw raised the priority of this task from to Needs Triage.
valhallasw updated the task description. (Show Details)
valhallasw added a project: Pywikibot.
valhallasw subscribed.
jayvdb set Security to None.
jayvdb moved this task from Backlog to Framework on the Pywikibot-tests board.