Commit graph

19 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
Noortheen Raja
78091a22f3 style: isort imports
fix #4584
2022-01-31 11:16:51 -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
9b91ec5154 some fixes, but not enough 2019-02-12 18:32:11 -05:00
Anthony Scopatz
634a8ec9f2 black tests 2018-08-30 09:18:49 -05:00
Jamie Bliss
2acb4eb9be Add ** to all the test handlers 2017-01-14 18:12:09 -05:00
Jamie Bliss
2f02e01de3 Make events keyword-only for future proof. 2017-01-14 17:31:29 -05:00
Jamie Bliss
dbe14a2673 Actually implement LoadEvent 2016-11-28 18:57:41 -05:00
Anthony Scopatz
5985c3d33b hot fix for pytest events 2016-08-28 10:32:10 -04:00
Anthony Scopatz
78a87d0304 some emergency fixup 2016-08-28 09:57:31 -04:00
Jamie Bliss
0ad9a2e2ab Add test to detect event typos 2016-08-27 21:44:26 -04:00
Jamie Bliss
4be3bf8950 Test for naming classes by string, too 2016-08-23 23:58:22 -04:00
Jamie Bliss
4ba21c9b16 Actually test event transmogrification 2016-08-23 23:54:29 -04:00
Jamie Bliss
1c1122b742 Refactor everything.
(Maybe I should have broken this up better?)
2016-08-23 23:44:05 -04:00
Jamie Bliss
5141fadfb4 Do some magic to make event docstrings work 2016-08-15 23:22:19 -04:00
Jamie Bliss
81d066a341 Rename so that __call__() is to register
```
@events.on_spam
def myhandler(eggs):
    ...
```
2016-08-15 23:13:44 -04:00
Jamie Bliss
44333fdcd5 Remove problematic "loopback" event style.
This has limited use because you have to do it in such a way that different
handlers don't step on each other or blow up on input they don't understand.
The worst case is the first use-case: command preprocessing.
2016-08-15 23:03:32 -04:00
Jamie Bliss
9dcd0f9fbf Add validators, plus some clarity and PEP8 fixes 2016-08-15 22:59:30 -04:00
Jamie Bliss
eddd11ae86 Add tests for the events system. 2016-07-28 00:42:00 -04:00