Commit graph

50 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
pre-commit-ci[bot]
ba8ae973b8 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
- [github.com/pycqa/isort: 5.11.4 → 5.12.0](https://github.com/pycqa/isort/compare/5.11.4...5.12.0)
2023-02-14 22:57:36 +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
Jeremy Schlatter
09fcab65d2
fix surprising scoping behavior in execx and xonsh -c (#4363) (#4364)
* fix #4363

* fix test_integrations.py

* add tests for issue 4363

* fix regression

* add news item

* fix formatting with black

* fix news formatting
2021-07-24 17:17:37 +03:00
Peter Ye
d33d60ee3e
Fix the handling of colons when mixed with comments (#4332)
* Add ends_with_colon_token tool

* Add execer test for comment ending with a colon

* Use ends_with_colon_token() to catch non-indented blocks in execer

* Use ends_with_colon_token() for automatic indentation in prompt_toolkit and readline

* Add news
2021-06-20 12:50:03 +03:00
Noorhteen Raja NJ
3ce8c9b337
add py310 (#4270)
* chore: adding py310 to ci

though this will require code/parser changes, this is to prepare for
upcoming adoption

* fix: set python version as string

* fix: reference to master -> main

* fix: coverage is not reported in master

- disable amalgamation
	1. during coverage report tests
	2. qa tools like mypy may follow imports
- use python 3.9 for coverage and qa report. since it will have more
coverage and better typing support

* chore: use py3.10 with setup-py action

* chore: add news-item check job

* fix: py3.10 error while starting

the match statement is not supported.
while the syntax support is only upto py3.8

* fix: news-item checker

* chore: enable fail report for py310 tests

* test: add test for ptk_shell
2021-06-07 13:40:40 -04:00
Daniel Shimon
27db574d99
Fix annotated assignment (#4278)
* ast: Fix annotated assignment

* ast: Support annotated variable without a value

* tests: Test annotated assign statements

* news: Add annotated-assignment
2021-05-12 12:39:11 -04:00
David Strobach
702bd2acc3 Add execx/evalx EOL tests 2020-03-19 11:56:11 +01:00
Anthony Scopatz
5bb4781bae fixed indentation errors 2019-02-04 18:00:21 -05:00
Anthony Scopatz
634a8ec9f2 black tests 2018-08-30 09:18:49 -05:00
Anthony Scopatz
e1137f35c2 multiwrap fix 2018-08-27 14:20:11 -05:00
Anthony Scopatz
3b0fe9144d fixed multiline autowrapping in @(expr) 2018-07-19 21:01:11 -04:00
Anthony Scopatz
b1ec6c7069 fix for echo * spam ; echo spam 2017-11-09 20:20:40 -05:00
Joel Gerber
2abb24f4f6
Docstring and comment spelling corrections
A number of common spelling typos found within various docstrings and
comments found within source code files have been identified and resolved.
2017-06-07 11:51:17 -04:00
Anthony Scopatz
0cb619468a line continuation fixes 2017-02-15 00:58:38 -05:00
laerus
bea8c62829 tests bugs fixing/test_parser & test_tools to go 2016-07-01 21:52:37 +03:00
laerus
36c0bcfd42 test execer/xonsh_execer fixture in conftest 2016-07-01 15:43:16 +03:00
Gil Forsyth
bd78cbffd4 more fixes for test skipping 2016-06-22 18:51:56 -04:00
Gil Forsyth
4eff251964 remove all nose imports and calls everywhere 2016-06-22 18:06:44 -04:00
Gil Forsyth
7e254d681e change all skip syntax to pytest 2016-06-22 17:32:02 -04:00
Gil Forsyth
46f842dcbe Merge master and update setup syntax in execer test 2016-06-22 09:57:31 -04:00
adam j hartz
4a53fb71cd add a few test cases 2016-06-11 21:02:28 -04:00
Gil Forsyth
74d4e6b892 change test setup syntax to match pytest 2016-06-07 15:53:38 -04:00
Anthony Scopatz
1643e1692e oh, yeah, blocks 2016-06-05 16:25:43 -04:00
Anthony Scopatz
30e1758478 added comma literals to subproc mode 2016-05-24 23:55:07 -04:00
adam j hartz
b82935f2b2 Merge pull request #949 from scopatz/grep
str().split() | grep exit now throws a SyntaxError
2016-05-19 20:54:14 -04:00
Anthony Scopatz
d9d7a73f6b duplicate test 2016-05-19 20:13:47 -04:00
Anthony Scopatz
c1712eeaed str().split() | grep exit now throws a SyntaxError 2016-05-19 20:12:07 -04:00
Anthony Scopatz
b76010d620 "fixed echo @("foo") > bar" 2016-05-19 18:52:50 -04:00
Anthony Scopatz
0298a8109f empty path 2016-05-16 02:22:23 -04:00
Anthony Scopatz
f873819237 fix test error when STOR_STDOUT = True 2016-05-16 01:07:14 -04:00
Anthony Scopatz
99ab59f26e tests pass 2016-04-09 00:25:53 -04:00
Anthony Scopatz
0f6a2dbe67 potential fix for indented subproc mode with comments 2016-02-21 14:37:03 -05:00
Kurtis Rader
e88c863d10 Add a uniform character encoding to all files.
I wouldn't normally do something like this but issue #487 brought to
my attention the fact that too many of the python modules don't have
an encoding comment and of those that do there is a lot of pointless
inconsistency in the style of the comment.
2015-11-16 14:10:40 -08:00
Burak Yigit Kaya
fa656e505e Fix error when checking for indentation 2015-08-06 01:58:22 +03:00
Anthony Scopatz
2b208b9592 fixes hanging indent error 2015-08-02 17:34:13 -05:00
Klaus Alexander Seistrup
ee65f492f2 Removed trailing whitespace 2015-07-29 23:58:25 +02:00
Robert W. Brewer
ad741edb6a windows: prettify test_win_ipconfig() 2015-05-12 03:24:35 -04:00
Robert W. Brewer
0ba6ad3f10 windows: use ON_WINDOWS and $SYSTEMROOT in tests 2015-05-12 03:14:36 -04:00
Robert W. Brewer
55e412c7e9 tab completion working with pyreadine; default prompt working; tests pass 2015-05-09 01:58:51 -04:00
Anthony Scopatz
7295327f7a more landsape tests 2015-03-26 01:04:05 -05:00
Anthony Scopatz
070576af44 try disabling syntax error, again 2015-03-26 00:54:03 -05:00
Anthony Scopatz
9a92812f1c try disabling syntax error 2015-03-26 00:15:50 -05:00
Anthony Scopatz
62cc3dc7a0 lexer fixes for open parens 2015-03-10 21:38:11 -05:00
Anthony Scopatz
a4be6a656c better everything 2015-03-01 19:13:09 -06:00
Anthony Scopatz
5d64d4492f seem to have working execer 2015-02-11 02:01:35 -06:00
Anthony Scopatz
e7e33c52e3 have ctx free fix 2015-02-03 02:02:57 -06:00