Skip to content

'function' object has no attribute 'im_func' with twisted TestCases on python 3 #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pytestbot opened this issue Mar 18, 2014 · 3 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Aaron Gallagher (BitBucket: habnabit, GitHub: habnabit)


The full traceback is:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/main.py", line 81, in wrap_session
INTERNALERROR>     doit(config, session)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/main.py", line 118, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 377, in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 388, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 289, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/main.py", line 138, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 377, in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 388, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/core.py", line 289, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File "/Users/aarongallagher/src/git/parsley/ve3/lib/python3.3/site-packages/_pytest/unittest.py", line 157, in pytest_runtest_protocol
INTERNALERROR>     Failure__init__ = ut.Failure.__init__.im_func
INTERNALERROR> AttributeError: 'function' object has no attribute 'im_func'

If I amend the line to omit the .im_func, the tests run without issue.


@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


looks like a missed operation on the python3 port

@pytestbot
Copy link
Contributor Author

Original comment by Daniel Graña (BitBucket: dangra, GitHub: dangra):


see pull request #132 for a possible fix

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


fix issue483: trial/py33 works now properly. Thanks Daniel Grana for PR.

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
fkohlgrueber pushed a commit to fkohlgrueber/pytest that referenced this issue Oct 27, 2018
Would prefer my personal email here. I realise it's still in the git log but c'est la vie.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant