Commit graph

39 commits

Author SHA1 Message Date
pre-commit-ci[bot]
66c0490d37
[pre-commit.ci] pre-commit autoupdate (#5271)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-30 12:23:50 +01:00
Gil Forsyth
33b2ac052b fix: update ptk highlight tests to reflect new tokenizing
temporary fix while we sort out what broke upstream
2023-01-17 13:27:17 -05:00
Noortheen Raja
f2b7d4ed4f style: sort imports 2022-03-24 19:49:30 +05:30
Noortheen Raja
81b65556a5 chore: update tests 2022-03-24 19:49:30 +05:30
Noortheen Raja
78091a22f3 style: isort imports
fix #4584
2022-01-31 11:16:51 -05:00
Noorhteen Raja NJ
7c4e207abd
update test xsh usage (#4581)
* todo

* test: remove usage of DummyEnv and setting .env attribute on xession fixture

one step closer to making too much of tweaking to xession during tests

* test: fix tests vox and gitstatus-prompt

* docs: update test-fixture usage

* fix: import flake8 error

* test: remove direct access to XSH in tests

* test: remove usage of XSH in test files

* todo

* test: use tmp-dir to create stubs

* refactor: use fixture factory to mock out XonshSession

* refactor: remove direct access of XSH from functions

* refactor: remove direct access of XSH from functions

* fix: qa checks

* refactor: rename variables to match their values

* test: update failing tests because it had no PATH set previously

* fix: remove builtins usage from pyghooks.py

* style:

* refactor: update tests to use fixtures

* fix: env varialbe is setup per function

some tests accidentally update the env variables and that is leaking
into next tests

* fix: failing vox tests

* test: set commands_cache per test

* test: fix failing tests

* fix: failing tests on linux

ptk-highlight

* fix: failing tests on Windows

cwd-prompt

* test: copy env as to not affect original object

* fix: lazily evaluate cmds-cache in pyghooks

* test: fix failing tests

* fix: qa errors import

* test: set commands-cache per test

while caching path results

* test: speedup test_thread_local_swap

* fix: failing tests on windows

* refactor: Execer doesn't control session

* refactor: XSH.unload will take care of reversing builtins attrs set

* test: use env.update over monkeypatch

* Revert "test: use env.update over monkeypatch"

This reverts commit 010a5022247a098f1741966b8af1bf758663480e.
2022-01-07 17:33:22 -05:00
Noorhteen Raja NJ
c2d25ac251
pre-commit hook for pyupgrade (#4583)
* chore: add pyupgrade

* refactor: upgrade code to py3.7+

ran `pre-commit run pyupgrade -a` while excluding changes to ply

* fix: flake errors
2021-12-06 14:42:26 -05:00
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
Anthony Scopatz
f048b295d6 black updates to tests and docs 2020-08-26 10:10:59 -05: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
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
Bob Hyman
bd313eef53 Fix test case for changing or deleting colors 2020-03-29 16:05:10 -04:00
Bob Hyman
9fe865169e color_files() never returns None for token. 2020-03-14 23:03:11 -04:00
Bob Hyman
f54129342b Hammer lint errors flat. 2020-01-04 13:56:02 -05:00
Bob Hyman
afd3cada69 Legit unit test failure 2020-01-04 09:29:09 -05:00
Bob Hyman
258c849c69 Initialize file_colors in XonshStyle; eliminate pre-cmdloop event 2020-01-03 21:30:14 -05:00
Bob Hyman
6082b61fc3 ls-colors -- colorize file arguments in subproc mode command lines 2019-12-26 05:51:48 -05:00
Anthony Scopatz
ca7acecc96 fix ptk tests 2019-10-23 18:38:16 -04:00
Jean-Benoist Leger
7725fd5ee0
Properly clean builtins.__xonsh__ before running test in tests/test_ptk_highlight.py 2019-04-19 23:19:40 +02:00
Anthony Scopatz
293d411652 just skip pn windows 2018-12-06 14:26:39 -05:00
Anthony Scopatz
4a250cb2aa add execer if needed 2018-12-06 14:16:11 -05:00
Anthony Scopatz
2c6abbf401 more test failure fixes 2018-11-19 23:24:32 -05:00
Anthony Scopatz
b32823d236 replace yield fixtures 2018-11-19 20:22:18 -05:00
Anthony Scopatz
4c91df2abc many test fixes 2018-09-13 14:03:35 -04:00
Anthony Scopatz
634a8ec9f2 black tests 2018-08-30 09:18:49 -05:00
BlahGeek
201364afda use pytest's tmpdir 2016-09-13 21:37:24 +08:00
BlahGeek
f9abbc8a05 support autocd path highlight 2016-09-13 11:29:49 +08:00
BlahGeek
acb0bfe3cb more tests 2016-09-13 10:54:20 +08:00
BlahGeek
50aecce6ff fix = in subproc arg 2016-09-13 10:41:39 +08:00
BlahGeek
9ce5a8494d fix alias lookup on windows 2016-09-12 11:52:09 +08:00
BlahGeek
ddf97f0149 support macro syntax 2016-09-12 11:47:18 +08:00
BlahGeek
c7629b1f3c add cd alias for windows while testing, support windows path highlight 2016-09-12 11:23:20 +08:00
BlahGeek
0f2ab88f2e Revert "tests use type instead of cd for windows"
This reverts commit 7c635add93.
2016-09-12 11:20:39 +08:00
BlahGeek
7c635add93 tests use type instead of cd for windows 2016-09-12 11:05:20 +08:00
BlahGeek
66d6f50662 use Name.Builtin instead of Keyword 2016-09-11 20:17:49 +08:00
BlahGeek
4d3e9cbed7 fix test fixture 2016-09-11 16:22:42 +08:00
BlahGeek
30e43401b8 cleanup code 2016-09-11 16:19:00 +08:00
BlahGeek
86fef03d45 fix tests for windows 2016-09-11 16:09:10 +08:00
BlahGeek
e311ae26cb new implementation of XonshLexer for pygments 2016-09-11 00:50:52 +08:00