jenkins-bot has submitted this change and it was merged.

Change subject: Set __name__ on generated test functions
......................................................................


Set __name__ on generated test functions

When tests.aspects creates multiple tests for a specified list
of sites, it was setting the name of the generated test in the
test class dictionary, but nose 2.7 also needs the generated test
function to have __name__ set.

Change-Id: I5687ec91dba68ffa671641c6c219f6a20bc5a84e
---
M tests/aspects.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/aspects.py b/tests/aspects.py
index 2dfcc09..1f6861c 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -850,6 +850,7 @@
                 test_name = test + '_' + key.replace('-', '_')
 
                 dct[test_name] = wrap_method(key, sitedata, dct[test])
+                dct[test_name].__name__ = str(test_name)
 
                 if key in dct.get('expected_failures', []):
                     dct[test_name] = unittest.expectedFailure(dct[test_name])

-- 
To view, visit https://gerrit.wikimedia.org/r/243817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5687ec91dba68ffa671641c6c219f6a20bc5a84e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to