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
(cherry picked from commit 4ec75cd7a3882f383fdfd0c3d6c6b2b13e839492)
---
M tests/aspects.py
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py
index f96d9f0..4e0411c 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -782,6 +782,7 @@
test_name = test + '_' + key
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/243831
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5687ec91dba68ffa671641c6c219f6a20bc5a84e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: XZise <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits