Commit graph

146 commits

Author SHA1 Message Date
Noorhteen Raja NJ
38295a1dd9
Remove globals (#4280)
* refactor: remove usage of global variables in abbrevs.py

* chore: add flake8-mutable to prevent mutable defaults

* fix: abbrevs expand test

* refactor: add xonsh session singleton

* refactor: fix circular errors when using xonshSession as singleton

* refactor: remove black magicked builtin attributes

* style: black format tests as well

* refactor: update tests to use xonsh-session singleton

* refactor: update abbrevs to not use builtins

* test: remove DummyCommandsCache and patch orig class

* fix: failing test_command_completers

* test: use monkeypatch to update xession fixture

* fix: failing test_pipelines

* fix: failing test_main

* chore: run test suit as single invocation

* test: fix tests/test_xonsh.xsh

* refactor: remove builtins from docs/conf.py

* fix: mypy error in jobs

* fix: test error from test_main

* test: close xession error in test_command_completers

* chore: use pytest-cov for reporting coverage

this will include subprocess calls, and will increase coverage

* style:
2021-05-20 13:14:26 +03:00
Andy Kipp
0dc896c284
feat: Ability to call the program by name from callable alias with the same name without the infinite loop error (#4218)
* fix aliases infinite loop

* black

* cleaning

* skip_if_on_windows

* skip_if_on_windows

* bump tests

* bump tests

* skip test

* remove skipping test

* Update xonsh/procs/specs.py

Co-authored-by: Daniel Shimon <daniel.shimon22@gmail.com>

* Update xonsh/procs/proxies.py

Co-authored-by: Daniel Shimon <daniel.shimon22@gmail.com>

* Make alias names internal

* Tests

* Tests

* Tests

* tests

Co-authored-by: a <a@a.a>
Co-authored-by: Daniel Shimon <daniel.shimon22@gmail.com>
2021-05-10 09:30:41 -04:00
Andy Kipp
3785cbf8b4
XONSH_SUBPROC_CAPTURED_PRINT_STDERR to False (#4231)
Co-authored-by: a <a@a.a>
2021-04-13 13:21:43 -04:00
Andy Kipp
e7b0977910
feat: Added environment variable to hide unwanted printing the stderr when using captured object. (#4221)
* Added XONSH_SUBPROC_CAPTURED_PRINT_STDERR

* black

Co-authored-by: a <a@a.a>
2021-04-12 15:31:45 -04:00
David Strobach
76cd2ea43e Add test for leading variable initialization 2020-09-04 21:55:12 +02:00
Bob Hyman
fc492cad97 Skip tests that run xonsh in subproc if not installedDo not try to shoehorn module into PATH(too complex to track Windows vs other VENV). 2020-08-10 17:16:36 -04:00
Bob Hyman
29a7ef09ea Merge branch 'is_3661' of /mnt/c/users/bobhy/src/xonsh into is_3661 2020-08-10 16:15:59 -04:00
Bob Hyman
f4bdbede2b integration tests add only tests/bin to PATH 2020-08-10 16:11:58 -04:00
Bob Hyman
24546280e9 Don't hack PATH for integration tests 2020-08-10 15:08:05 -04:00
Bob Hyman
8740b15462 Run same wc,pwd,cat from tests/bin on Windows.
Run without depending on py.exe
2020-08-10 01:43:51 -04:00
Bob Hyman
c22e80b717 Fix test dependency on xonsh.bat (and xon.sh) 2020-08-10 00:42:36 -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
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
Bob Hyman
de07c3ed37 Don't run test_integrations.py with XONSH_DEBUG=1 2020-06-28 14:21:53 -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
dd82c5ffd8 Clean up ignorable warnings in clean pytest run 2020-05-08 15:41:06 -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
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
eb975f6666 add some tests 2020-04-07 15:07:24 +02:00
Anthony Scopatz
2e30f330c0
Exitcode (#3465) 2020-03-01 15:06:33 -05:00
Bob Hyman
248b5cb73a fix #3418 2020-01-12 14:45:52 -05:00
Anthony Scopatz
2f0b04f4e5
version_info 2019-10-03 10:27:38 -04:00
Anthony Scopatz
f0160e54d8 fix tests for <v3.7 2019-10-01 17:01:20 -04:00
Anthony Scopatz
5afba70f1e Context vars fix 2019-10-01 16:56:27 -04:00
Anthony Scopatz
4975977b2b new check_output() test 2019-08-27 11:03:26 -04:00
Anthony Scopatz
8b747c8a58 skip on windows 2019-02-06 15:23:41 -05:00
Anthony Scopatz
ed22b3daff added integrations 2019-02-06 14:54:51 -05:00
Anthony Scopatz
08510f3515 don't close file descriptors 2019-02-06 14:51:52 -05:00
Anthony Scopatz
b851cf279d fix tests 2018-12-19 17:28:40 -05:00
Anthony Scopatz
89a42458d9 tests pass! 2018-09-13 16:49:09 -04:00
Anthony Scopatz
634a8ec9f2 black tests 2018-08-30 09:18:49 -05:00
Anthony Scopatz
8db169ec1a docs and tests 2018-08-20 19:57:56 -04:00
Anthony Scopatz
6894293549 fixed syntax error issues 2018-07-20 19:21:15 -04:00
Robert DeFriesse
fc926260ad Regression test for windows redirection bug fix. 2018-06-25 16:22:52 -04:00
Anthony Scopatz
ce030eb85e fixed callable alias e>o redirection 2017-12-07 23:24:06 -05:00
Anthony Scopatz
ec0c2ef143 don't check error status for window 2017-07-15 18:06:19 -05:00
Anthony Scopatz
19be0c409d fixed zero line test 2017-07-15 17:53:47 -05:00
Anthony Scopatz
4df37c0d73 fixed EOF in multi-line statement line number error 2017-07-15 17:51:21 -05:00
Jamie Bliss
bf11df618c Add test 2017-04-21 17:46:04 -04:00
Anthony Scopatz
7f8634a215 ambiguous fix 2017-03-02 22:49:52 -05:00
Anthony Scopatz
11253ee4f1 more test fixes 2017-02-27 21:48:34 -05:00
Anthony Scopatz
be9ca2a385 yet another fix 2017-02-27 14:11:39 -05:00
Anthony Scopatz
ae620c2e98 newline test fix 2017-02-27 11:40:02 -05:00
Anthony Scopatz
b0dce1af1e fixes and tests for bad globs 2017-02-26 21:54:39 -05:00