Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created October 19, 2020 13:17
Show Gist options
  • Save jaraco/a2fd1cd3b4282644294a1166b64141a5 to your computer and use it in GitHub Desktop.
Save jaraco/a2fd1cd3b4282644294a1166b64141a5 to your computer and use it in GitHub Desktop.
================================================= test session starts =================================================
platform linux -- Python 3.9.0, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
cachedir: .cache/pytest
rootdir: /home/jaraco/code/public/xonsh, configfile: setup.cfg
plugins: cov-2.10.1, timeout-1.4.2, xonsh-0.9.24
collecting ...  collecting 0 items  collecting 1015 items  collecting 3416 items / 1 skipped / 3415 selected  collecting 4076 items / 1 skipped / 4075 selected  collecting 4163 items / 1 skipped / 4162 selected  collecting 4183 items / 1 skipped / 4182 selected  collected 4183 items / 1 skipped / 4182 selected 
tests/test_xonsh.xsh ... [ 0%]
tests/test_lib/test_os.xsh .. [ 0%]
tests/test_lib/test_subprocess.xsh .... [ 0%]
tests/test_aliases.py ............. [ 0%]
tests/test_ansi_colors.py ..................................................................................... [ 2%]
............................................................................................................... [ 5%]
............................................................................................................... [ 7%]
............................................................................................................... [ 10%]
............................................................................................................... [ 13%]
............................................................................................................... [ 15%]
................................................................ [ 17%]
tests/test_ast.py ........................... [ 18%]
tests/test_base_shell.py .. [ 18%]
tests/test_bashisms.py ...................... [ 18%]
tests/test_builtins.py s..................................................................................... [ 20%]
tests/test_color_tools.py ............................ [ 21%]
tests/test_commands_cache.py ................................. [ 22%]
tests/test_contexts.py ......................... [ 22%]
tests/test_dirstack.py ...... [ 22%]
tests/test_dirstack_unc.py ..ssssssss [ 23%]
tests/test_environ.py .................s......................................... [ 24%]
tests/test_events.py .......... [ 24%]
tests/test_execer.py ss........................... [ 25%]
tests/test_foreign_shells.py .....s [ 25%]
tests/test_history.py ................................................. [ 26%]
tests/test_history_sqlite.py .................. [ 27%]
tests/test_imphooks.py ....... [ 27%]
tests/test_integrations.py .........................F........X........... [ 28%]
tests/test_jsonutils.py ....... [ 28%]
tests/test_lazyasd.py . [ 28%]
tests/test_lazyjson.py ................... [ 29%]
tests/test_lexer.py ............................................................................... [ 30%]
tests/test_man.py . [ 30%]
tests/test_news.py .. [ 31%]
tests/test_parser.py .........................................................................................F [ 33%]
FFFFFFFFFFFFFFFFFFFFFFFF....................................................................................... [ 35%]
.................................................................FF............................................ [ 38%]
............................................................................................................... [ 41%]
............................................................................................................... [ 43%]
...............................................F............................................................... [ 46%]
............................................................................................................... [ 49%]
............................................................................................................... [ 51%]
............................................................................................................... [ 54%]
............................................................................................................... [ 57%]
............................................................................................................... [ 59%]
............................................................................................................... [ 62%]
............................................................................................................... [ 65%]
............................................................................................................... [ 67%]
............................................................................................................... [ 70%]
............................................................................................................... [ 72%]
............................................................................................................... [ 75%]
............................................................................................................... [ 78%]
............................................................................................................... [ 80%]
....................................... [ 81%]
tests/test_path_completers.py ... [ 81%]
tests/test_platform.py . [ 81%]
tests/test_prompt.py ...........................................ss... [ 83%]
tests/test_ptk_completer.py ..... [ 83%]
tests/test_ptk_history.py ... [ 83%]
tests/test_ptk_multiline.py ....... [ 83%]
tests/test_ptk_shell.py ................... [ 83%]
tests/test_pyghooks.py ................................................................................ [ 85%]
tests/test_python_completers.py ........... [ 86%]
tests/test_readline_shell.py .......... [ 86%]
tests/test_tools.py ........................................................................................... [ 88%]
............................................................................................................... [ 91%]
............................................................................................................... [ 93%]
............................................................................................................... [ 96%]
................................................. [ 97%]
tests/test_vox.py ........ [ 97%]
tests/test_wizard.py .... [ 97%]
tests/test_xonfig.py ..... [ 98%]
tests/test_xontribs.py .... [ 98%]
tests/test_xoreutils.py .............. [ 98%]
tests/aliases/test_source.py .. [ 98%]
tests/aliases/test_xexec.py ....... [ 98%]
tests/completers/test_pip_completer.py ..................... [ 99%]
tests/test_lib/test_collections.py .............. [ 99%]
tests/test_lib/test_itertools.py ... [ 99%]
tests/xontribs/test_jedi.py ................ [100%]
====================================================== FAILURES =======================================================
______________ test_single_command_no_windows[$FOO='foo' $BAR=2 xonsh -c r'echo -n $FOO$BAR'-None-foo2] _______________
cmd = "$FOO='foo' $BAR=2 xonsh -c r'echo -n $FOO$BAR'", fmt = None, exp = 'foo2'
@skip_if_no_xonsh
@skip_if_on_windows
@pytest.mark.parametrize(
"cmd, fmt, exp",
[
("pwd", None, lambda: os.getcwd() + "\n"),
("echo WORKING", None, "WORKING\n"),
("ls -f", lambda out: out.splitlines().sort(), os.listdir().sort()),
("$FOO='foo' $BAR=2 xonsh -c r'echo -n $FOO$BAR'", None, "foo2",),
],
)
def test_single_command_no_windows(cmd, fmt, exp):
> check_run_xonsh(cmd, fmt, exp)
tests/test_integrations.py:506:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = "$FOO='foo' $BAR=2 xonsh -c r'echo -n $FOO$BAR'", fmt = None, exp = 'foo2', exp_rtn = 0
def check_run_xonsh(cmd, fmt, exp, exp_rtn=0):
"""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: Traceback (most recent call last):
E File "/home/jaraco/code/public/xonsh/.tox/python/bin/xonsh", line 33, in <module>
E sys.exit(load_entry_point('xonsh', 'console_scripts', 'xonsh')())
E File "/home/jaraco/code/public/xonsh/xonsh/main.py", line 422, in main
E _failback_to_other_shells(args, err)
E File "/home/jaraco/code/public/xonsh/xonsh/main.py", line 369, in _failback_to_other_shells
E raise err
E File "/home/jaraco/code/public/xonsh/xonsh/main.py", line 420, in main
E sys.exit(main_xonsh(args))
E File "/home/jaraco/code/public/xonsh/xonsh/main.py", line 483, in main_xonsh
E run_code_with_cache(
E File "/home/jaraco/code/public/xonsh/xonsh/codecache.py", line 207, in run_code_with_cache
E ccode = compile_code(filename, code, execer, glb, loc, mode)
E File "/home/jaraco/code/public/xonsh/xonsh/codecache.py", line 119, in compile_code
E ccode = execer.compile(code, glbs=glb, locs=loc, mode=mode, filename=filename)
E File "/home/jaraco/code/public/xonsh/xonsh/execer.py", line 138, in compile
E code = compile(tree, filename, mode)
E TypeError: required field "lineno" missing from keyword
E 
E assert '' == 'foo2'
E - foo2
tests/test_integrations.py:84: AssertionError
___________________________________________________ test_str_2slice ___________________________________________________
def test_str_2slice():
> check_ast('"hello"[0:3,0:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:430: AssertionError
___________________________________________________ test_str_2step ____________________________________________________
def test_str_2step():
> check_ast('"hello"[0:3:1,0:4:2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:434: AssertionError
_________________________________________________ test_str_2slice_all _________________________________________________
def test_str_2slice_all():
> check_ast('"hello"[:,:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:438: AssertionError
________________________________________________ test_str_2slice_upper ________________________________________________
def test_str_2slice_upper():
> check_ast('"hello"[5:,5:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:442: AssertionError
________________________________________________ test_str_2slice_lower ________________________________________________
def test_str_2slice_lower():
> check_ast('"hello"[:3,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:446: AssertionError
_____________________________________________ test_str_2slice_lowerupper ______________________________________________
def test_str_2slice_lowerupper():
> check_ast('"hello"[5:,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:450: AssertionError
________________________________________________ test_str_2slice_other ________________________________________________
def test_str_2slice_other():
> check_ast('"hello"[::2,::2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:454: AssertionError
_____________________________________________ test_str_2slice_lower_other _____________________________________________
def test_str_2slice_lower_other():
> check_ast('"hello"[:3:2,:3:2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:458: AssertionError
_____________________________________________ test_str_2slice_upper_other _____________________________________________
def test_str_2slice_upper_other():
> check_ast('"hello"[3::2,3::2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:462: AssertionError
___________________________________________________ test_str_3slice ___________________________________________________
def test_str_3slice():
> check_ast('"hello"[0:3,0:3,0:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:466: AssertionError
___________________________________________________ test_str_3step ____________________________________________________
def test_str_3step():
> check_ast('"hello"[0:3:1,0:4:2,1:3:2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:470: AssertionError
_________________________________________________ test_str_3slice_all _________________________________________________
def test_str_3slice_all():
> check_ast('"hello"[:,:,:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:474: AssertionError
________________________________________________ test_str_3slice_upper ________________________________________________
def test_str_3slice_upper():
> check_ast('"hello"[5:,5:,5:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:478: AssertionError
________________________________________________ test_str_3slice_lower ________________________________________________
def test_str_3slice_lower():
> check_ast('"hello"[:3,:3,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:482: AssertionError
___________________________________________ test_str_3slice_lowerlowerupper ___________________________________________
def test_str_3slice_lowerlowerupper():
> check_ast('"hello"[:3,:3,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:486: AssertionError
___________________________________________ test_str_3slice_lowerupperlower ___________________________________________
def test_str_3slice_lowerupperlower():
> check_ast('"hello"[:3,5:,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:490: AssertionError
___________________________________________ test_str_3slice_lowerupperupper ___________________________________________
def test_str_3slice_lowerupperupper():
> check_ast('"hello"[:3,5:,5:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:494: AssertionError
___________________________________________ test_str_3slice_upperlowerlower ___________________________________________
def test_str_3slice_upperlowerlower():
> check_ast('"hello"[5:,5:,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:498: AssertionError
___________________________________________ test_str_3slice_upperlowerupper ___________________________________________
def test_str_3slice_upperlowerupper():
> check_ast('"hello"[5:,:3,5:]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:502: AssertionError
___________________________________________ test_str_3slice_upperupperlower ___________________________________________
def test_str_3slice_upperupperlower():
> check_ast('"hello"[5:,5:,:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:506: AssertionError
________________________________________________ test_str_3slice_other ________________________________________________
def test_str_3slice_other():
> check_ast('"hello"[::2,::2,::2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:510: AssertionError
_____________________________________________ test_str_3slice_lower_other _____________________________________________
def test_str_3slice_lower_other():
> check_ast('"hello"[:3:2,:3:2,:3:2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:514: AssertionError
_____________________________________________ test_str_3slice_upper_other _____________________________________________
def test_str_3slice_upper_other():
> check_ast('"hello"[3::2,3::2,3::2]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:518: AssertionError
_________________________________________________ test_str_slice_true _________________________________________________
def test_str_slice_true():
> check_ast('"hello"[0:3,True]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:522: AssertionError
_________________________________________________ test_str_true_slice _________________________________________________
def test_str_true_slice():
> check_ast('"hello"[True,0:3]', False)
E AssertionError: Ast nodes fields differ : body (of type <class 'ast.Subscript'>) != body (of type <class 'ast.Call'>)
tests/test_parser.py:526: AssertionError
_______________________________________________ test_dict_tuple_key_get _______________________________________________
def test_dict_tuple_key_get():
> check_ast("{(42, 1): 65}[42, 1]")
E AssertionError: Ast nodes fields differ : slice (of type <class 'ast.Tuple'>) != slice (of type <class 'ast.Constant'>)
tests/test_parser.py:1146: AssertionError
______________________________________________ test_dict_tuple_key_get_3 ______________________________________________
def test_dict_tuple_key_get_3():
> check_ast("{(42, 1, 3): 65}[42, 1, 3]")
E AssertionError: Ast nodes fields differ : slice (of type <class 'ast.Tuple'>) != slice (of type <class 'ast.Constant'>)
tests/test_parser.py:1150: AssertionError
___________________________________________ test_leading_envvar_assignment ____________________________________________
def test_leading_envvar_assignment():
> check_xonsh_ast({}, "![$FOO='foo' $BAR=2 echo r'$BAR']", False)
E TypeError: required field "lineno" missing from keyword
tests/test_parser.py:2509: TypeError
=============================================== short test summary info ===============================================
FAILED tests/test_integrations.py::test_single_command_no_windows[$FOO='foo' $BAR=2 xonsh -c r'echo -n $FOO$BAR'-None-foo2]
FAILED tests/test_parser.py::test_str_2slice - AssertionError: Ast nodes fields differ : body (of type <class 'ast.S...
FAILED tests/test_parser.py::test_str_2step - AssertionError: Ast nodes fields differ : body (of type <class 'ast.Su...
FAILED tests/test_parser.py::test_str_2slice_all - AssertionError: Ast nodes fields differ : body (of type <class 'a...
FAILED tests/test_parser.py::test_str_2slice_upper - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_2slice_lower - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_2slice_lowerupper - AssertionError: Ast nodes fields differ : body (of type <c...
FAILED tests/test_parser.py::test_str_2slice_other - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_2slice_lower_other - AssertionError: Ast nodes fields differ : body (of type <...
FAILED tests/test_parser.py::test_str_2slice_upper_other - AssertionError: Ast nodes fields differ : body (of type <...
FAILED tests/test_parser.py::test_str_3slice - AssertionError: Ast nodes fields differ : body (of type <class 'ast.S...
FAILED tests/test_parser.py::test_str_3step - AssertionError: Ast nodes fields differ : body (of type <class 'ast.Su...
FAILED tests/test_parser.py::test_str_3slice_all - AssertionError: Ast nodes fields differ : body (of type <class 'a...
FAILED tests/test_parser.py::test_str_3slice_upper - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_3slice_lower - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_3slice_lowerlowerupper - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_lowerupperlower - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_lowerupperupper - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_upperlowerlower - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_upperlowerupper - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_upperupperlower - AssertionError: Ast nodes fields differ : body (of ty...
FAILED tests/test_parser.py::test_str_3slice_other - AssertionError: Ast nodes fields differ : body (of type <class ...
FAILED tests/test_parser.py::test_str_3slice_lower_other - AssertionError: Ast nodes fields differ : body (of type <...
FAILED tests/test_parser.py::test_str_3slice_upper_other - AssertionError: Ast nodes fields differ : body (of type <...
FAILED tests/test_parser.py::test_str_slice_true - AssertionError: Ast nodes fields differ : body (of type <class 'a...
FAILED tests/test_parser.py::test_str_true_slice - AssertionError: Ast nodes fields differ : body (of type <class 'a...
FAILED tests/test_parser.py::test_dict_tuple_key_get - AssertionError: Ast nodes fields differ : slice (of type <cla...
FAILED tests/test_parser.py::test_dict_tuple_key_get_3 - AssertionError: Ast nodes fields differ : slice (of type <c...
FAILED tests/test_parser.py::test_leading_envvar_assignment - TypeError: required field "lineno" missing from keyword
========================= 29 failed, 4138 passed, 16 skipped, 1 xpassed in 161.50s (0:02:41) ==========================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment