8 Commits

Author SHA1 Message Date
TomJGooding
7a9d32fdbf test: make tests async to fix failures on Python 3.9
After upgrading `pytest-asyncio` to the latest version, lots of tests
started failing in CI only on Python 3.9:

`RuntimeError: There is no current event loop in thread 'MainThread'`

Apparently these tests may have only been passing previously due to
issues in earlier versions of `pytest-asyncio`. Changing these tests to
async seems to fix the failures on Python 3.9.

Related issue:
https://github.com/pytest-dev/pytest-asyncio/issues/1039
2025-09-17 13:38:05 +01:00
Will McGugan
1c5c08040d tests 2024-07-20 18:07:22 +01:00
Darren Burns
9287f64a66 Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
Dave Pearson
5df5f12906 Run black over node tests 2023-01-09 13:57:13 +00:00
Dave Pearson
abad0a311a Make NodeList._index "public"
See https://github.com/Textualize/textual/pull/1095#discussion_r1011988160
2022-11-02 16:10:34 +00:00
Dave Pearson
016f7be83a Add an insert method to the NodeList 2022-11-01 22:26:38 +00:00
Dave Pearson
cee69fbc32 Add an _index method to NodeList
This maps on to a normal List.index.
2022-11-01 10:55:15 +00:00
Dave Pearson
294166cfec Add unit tests for the NodeList class 2022-11-01 09:58:32 +00:00