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

Unit Test failure in test_integrations #3397

Closed
bobhy opened this issue Dec 6, 2019 · 3 comments
Closed

Unit Test failure in test_integrations #3397

bobhy opened this issue Dec 6, 2019 · 3 comments

Comments

@bobhy
Copy link
Contributor

bobhy commented Dec 6, 2019

Unexpected unit test failures in brand new clone of master branch.

Running ubuntu 19.10, but python 3.8 in the venv for xonsh (3.71 comes preinstalled). Maybe that's the environment difference?

Current Behavior

Failures.

Traceback (if applicable)

============================= test session starts ==============================
platform linux -- Python 3.8.0, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: /mnt/myd/dev/src/xonsh, inifile: setup.cfg
plugins: timeout-1.3.3, cov-2.8.1, flake8-1.0.4, xonsh-0.9.13
collected 2148 items / 2132 deselected / 16 selected
run-last-failure: rerun previous 16 failures (skipped 630 files)

tests/test_integrations.py FFF                                           [ 18%]
tests/test_parser.py FFFFFF                                              [ 56%]

=================================== FAILURES ===================================
________________________________ test_printfile ________________________________

    @_bad_case
    def test_printfile():
>       check_run_xonsh("printfile.xsh", None, "printfile.xsh\n")

tests/test_integrations.py:471: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = 'printfile.xsh', fmt = None, exp = 'printfile.xsh\n'

    def check_run_xonsh(cmd, fmt, exp):
        """The ``fmt`` parameter is a function
        that formats the output of cmd, can be None.
        """
        out, err, rtn = run_xonsh(cmd, stderr=sp.PIPE)
        if callable(fmt):
            out = fmt(out)
        if callable(exp):
            exp = exp()
>       assert out == exp, err
E       AssertionError: /usr/bin/env: ‘python3 -u’: No such file or directory
E         /usr/bin/env: use -[v]S to pass options in shebang lines
E         
E       assert '' == 'printfile.xsh\n'
E         + printfile.xsh

tests/test_integrations.py:93: AssertionError
________________________________ test_printname ________________________________

    @_bad_case
    def test_printname():
>       check_run_xonsh("printfile.xsh", None, "printfile.xsh\n")

tests/test_integrations.py:476: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = 'printfile.xsh', fmt = None, exp = 'printfile.xsh\n'

    def check_run_xonsh(cmd, fmt, exp):
        """The ``fmt`` parameter is a function
        that formats the output of cmd, can be None.
        """
        out, err, rtn = run_xonsh(cmd, stderr=sp.PIPE)
        if callable(fmt):
            out = fmt(out)
        if callable(exp):
            exp = exp()
>       assert out == exp, err
E       AssertionError: /usr/bin/env: ‘python3 -u’: No such file or directory
E         /usr/bin/env: use -[v]S to pass options in shebang lines
E         
E       assert '' == 'printfile.xsh\n'
E         + printfile.xsh

tests/test_integrations.py:93: AssertionError
_______________________________ test_sourcefile ________________________________

    @_bad_case
    def test_sourcefile():
>       check_run_xonsh("printfile.xsh", None, "printfile.xsh\n")

tests/test_integrations.py:481: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = 'printfile.xsh', fmt = None, exp = 'printfile.xsh\n'

    def check_run_xonsh(cmd, fmt, exp):
        """The ``fmt`` parameter is a function
        that formats the output of cmd, can be None.
        """
        out, err, rtn = run_xonsh(cmd, stderr=sp.PIPE)
        if callable(fmt):
            out = fmt(out)
        if callable(exp):
            exp = exp()
>       assert out == exp, err
E       AssertionError: /usr/bin/env: ‘python3 -u’: No such file or directory
E         /usr/bin/env: use -[v]S to pass options in shebang lines
E         
E       assert '' == 'printfile.xsh\n'
E         + printfile.xsh

tests/test_integrations.py:93: AssertionError

Steps to Reproduce

  1. git clone https://github.com/xonsh/xonsh.git
  2. ...fiddle around installing python 3.8.0 in venv ...
  3. vox active venv
  4. pip install requirements/test.txt
  5. py.test -q
@gforsyth
Copy link
Collaborator

Hey @bobhy -- the Python 3.8 failures are due to changes in the Python AST in 3.8 -- I have fixes for those in #3384 if you want to try out that branch. Otherwise you can downgrade to 3.7 and everything should pass.

Thanks for reporting!

@bobhy
Copy link
Contributor Author

bobhy commented Dec 25, 2019

Hi @gforsyth -- when will the Python 3.8 AST fixes be merged into master? I have an unrelated enhancement ready to go, but I mistakenly pulled your fixes into my branch, so can't open a clean PR. If it will be a while, I will downgrade my dev environment and purify my branch.

@gforsyth
Copy link
Collaborator

gforsyth commented Dec 25, 2019 via email

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