jenkins-bot merged this change.

View Change

Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified
[tests] inspect.getargspec is still available with Python 3.9.0a2

- remove skipping TestPythonArgSpec for Python 3.6+
because it is still available
- test DeprecationWarning for all Python 3 versions because
tests runs on Python 3.5+ only

Change-Id: I01a77c394657808e8c2c833c4dc6cd2b098dd754
---
M tests/tools_tests.py
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index b507f9e..1cb70d9 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -749,7 +749,6 @@
return tools.getargspec(method)


-@unittest.skipIf(tools.PYTHON_VERSION >= (3, 6), 'removed in Python 3.6')
class TestPythonArgSpec(TestArgSpec):

"""Test the same tests using Python's implementation."""
@@ -759,7 +758,7 @@
def getargspec(self, method):
"""Call inspect's getargspec function."""
with warnings.catch_warnings():
- if tools.PYTHON_VERSION >= (3, 5):
+ if not tools.PY2:
warnings.simplefilter('ignore', DeprecationWarning)
return inspect.getargspec(method)


To view, visit change 565528. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I01a77c394657808e8c2c833c4dc6cd2b098dd754
Gerrit-Change-Number: 565528
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Legoktm <legoktm@member.fsf.org>
Gerrit-Reviewer: jenkins-bot (75)