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

Error in Python 3.5.0 #1005

Closed
lyapun opened this issue Sep 15, 2015 · 3 comments
Closed

Error in Python 3.5.0 #1005

lyapun opened this issue Sep 15, 2015 · 3 comments

Comments

@lyapun
Copy link

lyapun commented Sep 15, 2015

Hello!

I tried to upgrade one of my project to use Python 3.5.0, and tried to execute my tests, using py.test, but I got such error, which is not reproducable with Python 3.4.3:

 ✗ py.test -x
================================================= test session starts =================================================
platform darwin -- Python 3.5.0 -- py-1.4.30 -- pytest-2.7.2
rootdir: /Users/tarasliapun/Work/turfmapp-hq/ingame, inifile: 
plugins: cov
collecting 2 items / 1 errors
======================================================= ERRORS ========================================================
_______________________________________ ERROR collecting tests/test_rewards.py ________________________________________
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:969: in _find_and_load
    ???
<frozen importlib._bootstrap>:954: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:892: in _find_spec
    ???
<frozen importlib._bootstrap>:873: in _find_spec_legacy
    ???
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:137: in find_module
    source_stat, co = _rewrite_test(state, fn_pypath)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:278: in _rewrite_test
    rewrite_asserts(tree)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:336: in rewrite_asserts
    AssertionRewriter().run(mod)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:557: in run
    new.extend(self.visit(child))
../../../.pyenv/versions/3.5.0/lib/python3.5/ast.py:245: in visit
    return visitor(node)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:665: in visit_Assert
    top_condition, explanation = self.visit(assert_.test)
../../../.pyenv/versions/3.5.0/lib/python3.5/ast.py:245: in visit
    return visitor(node)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:796: in visit_Compare
    left_res, left_expl = self.visit(comp.left)
../../../.pyenv/versions/3.5.0/lib/python3.5/ast.py:245: in visit
    return visitor(node)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:757: in visit_Call
    new_func, func_expl = self.visit(call.func)
../../../.pyenv/versions/3.5.0/lib/python3.5/ast.py:245: in visit
    return visitor(node)
../../../.pyenv/versions/turfmapp-mc/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:700: in visit_Name
    locs = ast.Call(self.builtin("locals"), [], [], None, None)
E   TypeError: Call constructor takes either 0 or 3 positional arguments
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Session.Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================== 1 error in 0.61 seconds ===============================================

@The-Compiler
Copy link
Member

This was already fixed in #801 - there should be a new release somewhen this week.

As a workaround, you can use --assert=plain.

@lyapun
Copy link
Author

lyapun commented Sep 15, 2015

Thanks, and sorry for create duplicate

@hpk42
Copy link
Contributor

hpk42 commented Sep 15, 2015

2.7.3 is released now which works with py35.

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