Commit graph

1394 commits

Author SHA1 Message Date
Morten Enemark Lund
a8fd1a3d7f remove mock
has_prompt_toolkit no longer used in xonsh.shell
2020-08-06 14:11:58 +02:00
Morten Enemark Lund
9e1316b0d0 Add test that PTK was vended correctly 2020-08-06 13:26:49 +02:00
Morten Enemark Lund
3ab222b55a Fix ptk shell tests 2020-08-06 13:05:50 +02:00
Anthony Scopatz
c40c9de9ad
Merge pull request #3627 from laloch/argv0
Set argv[0] of a subprocess to the command as inserted by the user
2020-08-05 10:41:48 -05:00
David Dotson
a8d4a57f01
Environment variable registration, deregistration (addresses #3227) (#3377)
* First attempt at register/deregister machinery for envvars

* Added detailed docstring, simplified ensurers

Also added some type checking that became clear from docstring writing.

* Changes in response to @scopatz review

Simplified kwarg names.

* defaultval -> default

* Created new Var namedtuple, as well as DEFAULT_VARS

We should now delete DEFAULT_ENSURERS, DEFAULT_VALUES, DEFAULT_DOCS, and
refactor Env to use the new single namedtuple and the DEFAULT_VARS dict

* Removed DEFAULT_ENSURERS, DEFAULT_VALUES, DEFAULT_DOCS

Now need to edit Env to use new DEFAULT_VARS, Var namedtuple

* Finished updating Env object to use new combined Var

Also made corresponding changes elsewhere ensurer was used

* Working on test failures

* More fixes in light of test failures

* Set default values for Var in register.

There's a bit of duplication here, but makes for a cleaner function.

* Black reformatting on environ.py

* Removed history replay

* Added register tests

* Added addtional deregistration test

* Removed all replay references, in docs too

* Added news item for env-reg-dereg

* trigger rebuild

* doc fix

* more doc fixes

* again

* attr names

* reorder imports

* fix flake error

Co-authored-by: Anthony Scopatz <scopatz@gmail.com>
2020-08-05 10:39:11 -04:00
Matthias Bussonnier
784c5286ef
Remove most of Python 3.5 compatibility code. (#3654)
There  now should not be any remaining  3,5 conditinal code.
We now directly use inspect's getouterframes, so remove it from
inspector

The 3.5 parser get merged into 3.6 and a number of global vaiable
referring to 3.5/3.6 are now gone.

The only remaining mention is appveyor test, which are anyway failing
but not being seen as so by GitHub, so I'll leave them alone.
2020-08-05 10:29:31 -04:00
David Strobach
dfcce2b4d0 Add test for subprocess argv[0]
The test needs access to procfs, so it only runs on Linux.
2020-08-05 15:15:02 +02:00
Anthony Scopatz
a816084d44
Merge pull request #3650 from daniel-shimon/improve-completers
Add tests and fix bugs for RichCompletion and Jedi xontrib
2020-08-04 21:11:47 -05:00
Daniel Shimon
a0439bd35f completers: ptk, readline: Add tests for RichCompletion 2020-08-05 00:15:17 +03:00
Daniel Shimon
5f50b620b7 xontrib: jedi: Add jedi completer tests 2020-08-05 00:15:17 +03:00
Anthony Scopatz
8b933da995
Merge pull request #3632 from dyuri/issue_3402
#3402 set the exit code for single commands
2020-08-01 12:34:40 -05:00
Gyuri Horak
a1a08386bc
Single command return code integration tests fixed for macOS (#3402) 2020-07-29 08:55:48 +02:00
David Strobach
3d954cacae tests: Fix line continuations test 2020-07-28 20:00:07 +02:00
Gyuri Horak
46143f2b6e
Integration tests for single command return codes #3402 2020-07-28 17:35:16 +02:00
Anthony Scopatz
6d0e6ee1ae
Merge pull request #3524 from bobhy/failback_shell_env
Failback shell env
2020-07-27 21:21:32 -05:00
Bob Hyman
de07c3ed37 Don't run test_integrations.py with XONSH_DEBUG=1 2020-06-28 14:21:53 -04:00
Bob Hyman
15f3d8852b fix history gc for JSON backend; deal with large accumulations while this was broken 2020-06-26 20:47:54 -04:00
Bob Hyman
dde73ba72c Xonsh failback to /usr/bin/bash in preference to /etc/shells 2020-06-25 19:49:04 -04:00
Bob Hyman
6492a61171 test 2020-06-24 20:03:56 -04:00
Bob Hyman
129ce9e44a LS_COLORS add mh, change rs to fi; support ln=target 2020-06-20 17:46:37 -04:00
Bob Hyman
016afa5281 Merge branch 'is_3608' of https://github.com/bobhy/xonsh into is_3608 2020-06-14 14:36:06 -04:00
Bob Hyman
b65f7b0ac5 Only test easy-to-test cases on Windows. 2020-06-14 13:16:37 -04:00
Bob Hyman
57ed6e553a Prune test cases that won't work on Windows. 2020-06-14 13:08:11 -04:00
Bob Hyman
08a79c97c8 don't try to create pipe on Windows; return 'or', not 'mi' for broken link 2020-06-14 00:43:15 -04:00
Bob Hyman
08f1b06749 ln=target; fix #3578 2020-06-13 01:36:22 -04:00
Bob Hyman
1f8ad1c285 use ls --colors implementation; no os.listxattr on Windows 2020-06-12 16:37:19 -04:00
Bob Hyman
3d3d09e00a Mega rewrite color_files per ls -c sources; first step to ln=target 2020-06-11 21:28:25 -04:00
Bob Hyman
24b83bcf38 Support $LS_COLORS 'ca' (linux only) 2020-06-10 22:07:50 -04:00
Bob Hyman
4e230fa5a8 LS_COLORS add 'mh' change 'rs' to 'fi' 2020-06-09 21:47:59 -04:00
Bob Hyman
21bb138644 flake8 complains in Windows about symbolic links; remove fortunately redundant linked file 2020-05-23 23:24:32 -04:00
Bob Hyman
6d01b7c880 Merge branch 'master' into flake8_0 2020-05-14 19:54:06 -04:00
David Strobach
3a6e9de201
Fix column offset of unary operator AST node (#3565)
* Fix unary operator AST node column offset

This fixes a bug in subprocess mode. Logical subrocess
operators could not follow long subprocess arguments (e.g. --version).
2020-05-10 10:17:55 -04:00
Bob Hyman
68fbf93ed1 Merge branch 'master' into flake8_in_CI 2020-05-08 15:42:28 -04:00
Bob Hyman
dd82c5ffd8 Clean up ignorable warnings in clean pytest run 2020-05-08 15:41:06 -04:00
David Strobach
5d74e5c2a0
Merge pull request #3527 from xonsh/fix_pip_completer
Fix `pip` completer misfires for `pipx`
2020-05-08 15:10:44 +02:00
Bob Hyman
a6bb5e2d56 Run (pure) flake8 in CI; deprecate config for pytest-flake8 2020-05-06 22:49:11 -04:00
Bob Hyman
26475146e2
Flake8 1 (#3550)
* flake8 fixes -- tests only

* fix ci failure

* integrate fix from is_3551 so tests will pass.

* Update tests/test_builtins.py

Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
2020-05-05 06:42:28 -04:00
Gil Forsyth
80cf826961
Mark flaky test (#3556) 2020-04-30 20:47:23 -04:00
Bob Hyman
9aa4d4803c
fix test case for convert_macro_arg (#3552)
* fix test case for convert_macro_arg

* fix test case for convert_macro_arg
2020-04-30 20:31:45 -04:00
Gil Forsyth
f32f0a0d96 Fix pip completer misfires for pipx
Need a word-boundary now after the initial match

Resolves #3526
Resolves #3379

Signed-off-by: Gil Forsyth <gil@forsyth.dev>
2020-04-20 11:26:49 -04:00
Bob Hyman
53bfe8c99c
Add ptk3 (#3521)
* delete package ptk; rename ptk2 to ptk_shell.; leave ptk2 as alias for ptk_shell.
* SHELL_TYPE "prompt_toolkit" only; remove ptk1 specific behavior.
* Doc updates: eliminate reference to prompt-toolkit < 2.0
* update requirements files ptk>=2; test shell_style="none"
* fix ptk2 stub per code review
* Add ptk2 to list of packages to install.
2020-04-18 10:44:27 -04:00
Raphael Das Gupta
3a232c6782
make comments easier to comprehend (#3517)
Make comments in the test_multiline_...-testcases easier to comprehend
by using correct grammar and spelling and by stating more relevant aspects.

Comment on test parameters with inline instead of block comments,
as this makes it easier to associate code lines with comments,
without having to resort to additional blank lines for separation.
2020-04-15 14:14:24 -04:00
David Strobach
940713f7f8 Add @$() tests 2020-04-08 18:34:47 +02:00
David Strobach
222472d015 Fix ampersand parameter test 2020-04-07 23:48:22 +02:00
David Strobach
d49335174c Merge branch 'master' into fix-background-operator 2020-04-07 22:39:42 +02:00
David Strobach
eb975f6666 add some tests 2020-04-07 15:07:24 +02:00
Bob Hyman
65e639eb88 Merge branch 'master' into is3474 2020-03-29 16:14:54 -04:00
Bob Hyman
bd313eef53 Fix test case for changing or deleting colors 2020-03-29 16:05:10 -04:00
Anthony Scopatz
feeb6315cc
Merge pull request #3482 from laloch/execx-evalx-newline
Fix execx / evalx trailing newline
2020-03-19 11:50:33 -04:00
David Strobach
702bd2acc3 Add execx/evalx EOL tests 2020-03-19 11:56:11 +01:00