compat::getfuncargnames removes self from instance method twice by mistake
See original GitHub issue- a detailed description of the bug or suggestion I have a pyfuncitem which is an instance method and its signature looks like this: def run_test(self, testbed_obj): <== This testbed_obj is a fixture When getfuncargnames got called to return the argnames, it removed this testbed_obj in line 168 of compat.py, which I think is wrong, because the parameter got from line 146 of compat.py has self removed from the signature.
- output of
pip list
from the virtual environment you are using Package Version Location
astroid 1.4.9 atomicwrites 1.3.0 attrs 19.3.0 automatos-tool-library 15 avro 1.9.1 backports.functools-lru-cache 1.6.1 backports.shutil-get-terminal-size 1.0.0 backports.ssl-match-hostname 3.7.0.1 bcrypt 3.1.7 certifi 2019.11.28 cffi 1.13.2 chardet 3.0.4 colorama 0.4.3 configparser 4.0.2 confluent-kafka 1.3.0 contextlib2 0.6.0.post1 coverage 5.0.3 cryptography 2.8 decorator 4.4.1 dicttoxml 1.7.4 docker-py 1.10.6 docker-pycreds 0.4.0 enum34 1.1.6 filelock 3.0.12 flake8 3.6.0 FormEncode 1.3.1 funcsigs 1.0.2 future 0.18.2 futures 3.3.0 gitdb2 2.0.6 GitPython 2.1.14 httpretty 0.9.7 idna 2.8 importlib-metadata 1.5.0 ipaddress 1.0.23 isort 4.3.21 lazy-object-proxy 1.4.3 logutils 0.3.5 mccabe 0.6.1 mock 3.0.5 more-itertools 5.0.0 ndg-httpsclient 0.5.1 packaging 20.1 paramiko 2.7.1 pathlib2 2.3.5 pip 20.0.2 pluggy 0.13.1 py 1.8.1 pyasn1 0.4.8 pybase64 0.5.0 pycodestyle 2.4.0 pycparser 2.19 pycyclone 0.9.277 pyflakes 2.0.0 pylint 1.6.4 PyNaCl 1.3.0 pyOpenSSL 19.1.0 pyparsing 2.4.6 pysftp 0.2.9 pytest 4.6.9 pytest-html 1.22.0 pytest-metadata 1.8.0 python-nmap 0.6.1 pytz 2019.3 pyvmomi 6.7.3 PyYAML 5.3 redis 2.10.6 requests 2.22.0 requests-mock 1.6.0 requests-toolbelt 0.9.1 retrying 1.3.3 scandir 1.10.0 setuptools 44.0.0 setuptools-scm 3.2.0 six 1.14.0 smmap2 2.0.5 spur 0.3.21 suds 0.4 toml 0.10.0 tox 3.14.3 urllib3 1.23 uuid 1.30 validators 0.11.3 virtualenv 16.7.9 waiting 1.4.1 walrus 0.3.5 wcwidth 0.1.8 websocket-client 0.57.0 wheel 0.34.2 wrapt 1.11.2 xmltodict 0.12.0 zipp 1.1.0 We have some private Python packages that I don’t want to list here.
- pytest and operating system versions pytest 4.6.9 Windows 10
- minimal example if possible class MyTest(BaseTestCase): def run_test(self, testbed_obj):
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
i apologize, after re-reading the original text i understood the issue is indeed abouta bound method on a own item,
we should support bound methods there and with signature and a type check we probably can do that correctly
I suppose I should create PR against 4.6.x branch?