Commit Graph

5 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
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
4adfe69ec9 Remove TreeNode as a pseudo-widget
This encourages importing it from `textual.widgets.tree` instead, keeping it
in line with the other changes made for #1637.

Note this is a breaking change.
2023-01-23 17:37:58 +00:00
Dave Pearson
ea8252cfcc Run black over recent Tree tests
Now that we're running black on tests...
2023-01-07 09:30:01 +00:00
Dave Pearson
d39c59c414 Move the TreeNode label tests into a better-named file
There's going to be a whole bunch of tests relating to the Tree and TreeNode
coming, let's make sure this ends up being fairly granular.

(side thought: it might be a good time soon to revisit all the tests for
Textual and try and wrangle them into some tidy structure)
2023-01-05 10:01:52 +00:00