Skip to content
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

Tornado test raising type error #46

Open
ror6ax opened this issue Feb 12, 2018 · 2 comments
Open

Tornado test raising type error #46

ror6ax opened this issue Feb 12, 2018 · 2 comments

Comments

@ror6ax
Copy link

ror6ax commented Feb 12, 2018

Running tests gives me this:

=========================================================================================== ERRORS ===========================================================================================
__________________________________________________________ ERROR collecting tests/opentracing_instrumentation/test_tornado_http.py ___________________________________________________________

self = <CallInfo when='collect' exception: test_http_fetch() takes exactly 4 arguments (0 given)>, func = <function <lambda> at 0x7f93c987c668>, when = 'collect'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

/usr/lib/python2.7/site-packages/_pytest/runner.py:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/site-packages/_pytest/runner.py:370: in <lambda>
    lambda: list(collector.collect()),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Generator 'test_http_fetch'>

    def collect(self):
        # test generators are seen as collectors but they also
        # invoke setup/teardown on popular request
        # (induced by the common "test_*" naming shared with normal tests)
        from _pytest import deprecated
        self.session._setupstate.prepare(self)
        # see FunctionMixin.setup and test_setupstate_is_preserved_134
        self._preservedparent = self.parent.obj
        values = []
        seen = {}
>       for i, x in enumerate(self.obj()):
E       TypeError: test_http_fetch() takes exactly 4 arguments (0 given)

/usr/lib/python2.7/site-packages/_pytest/python.py:597: TypeError
__________________________________________________________ ERROR collecting tests/opentracing_instrumentation/test_tornado_http.py ___________________________________________________________

self = <CallInfo when='collect' exception: test_http_fetch_with_interceptor() takes exactly 4 arguments (0 given)>, func = <function <lambda> at 0x7f93c2c58578>, when = 'collect'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

/usr/lib/python2.7/site-packages/_pytest/runner.py:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/site-packages/_pytest/runner.py:370: in <lambda>
    lambda: list(collector.collect()),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Generator 'test_http_fetch_with_interceptor'>

    def collect(self):
        # test generators are seen as collectors but they also
        # invoke setup/teardown on popular request
        # (induced by the common "test_*" naming shared with normal tests)
        from _pytest import deprecated
        self.session._setupstate.prepare(self)
        # see FunctionMixin.setup and test_setupstate_is_preserved_134
        self._preservedparent = self.parent.obj
        values = []
        seen = {}
>       for i, x in enumerate(self.obj()):
E       TypeError: test_http_fetch_with_interceptor() takes exactly 4 arguments (0 given)

/usr/lib/python2.7/site-packages/_pytest/python.py:597: TypeError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================== 2 error in 0.38 seconds ===================================================================================

Python 3 version is failing similarly. What am I doing wrong? ;)

@yurishkuro
Copy link
Contributor

Are you running in virtualenv with the correct dependencies?

@Jamim
Copy link
Contributor

Jamim commented Aug 31, 2019

Hello @ror6ax,
Can this issue be closed already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants