datasette: Test failures in CI: There is no current event loop in thread 'MainThread'
Oddly they don’t affect all versions of Python: https://github.com/simonw/datasette/actions/runs/13096055517/job/36538457787
=========================== short test summary info ============================
FAILED tests/test_permissions.py::test_cli_create_token[options0-expected0] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
FAILED tests/test_permissions.py::test_cli_create_token[options1-expected1] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
FAILED tests/test_permissions.py::test_cli_create_token[options2-expected2] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
FAILED tests/test_permissions.py::test_cli_create_token[options3-expected3] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
FAILED tests/test_permissions.py::test_cli_create_token[options4-expected4] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
FAILED tests/test_permissions.py::test_cli_create_token[options5-expected5] - AssertionError:
assert 0 == 1
+ where 1 = <Result RuntimeError("There is no current event loop in thread 'MainThread'.")>.exit_code
= 6 failed, 1447 passed, 7 skipped, 1 xfailed, 2 xpassed in 172.41s (0:02:52) ==
Looks like they affect the tests of various CLI tools.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- pytest.mark.serial on CLI tests, refs #2461 — committed to simonw/datasette by simonw 2 years ago
- pytest.mark.serial on CLI tests, refs #2461 — committed to simonw/datasette by simonw 2 years ago
- Skip the serial marked tests in pytest coverage Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2634896235 — committed to simonw/datasette by simonw 2 years ago
- Try the event_loop fixture Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2634920351 — committed to simonw/datasette by simonw 2 years ago
- Try the event_loop fixture (#2463) Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2634920351 — committed to simonw/datasette by simonw 2 years ago
- Stop using event_loop fixture in specific places - refs #2461 This reverts commit 962da77d616f82da6c6077a348246883cc51ad11. — committed to simonw/datasette by simonw 2 years ago
- asyncio_default_fixture_loop_scope = function Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2635131126 — committed to simonw/datasette by simonw 2 years ago
- Fix a bunch of BeautifulSoup deprecation warnings Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2635156004 — committed to simonw/datasette by simonw 2 years ago
- xfail for sql_time_limit tests Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2635232496 — committed to simonw/datasette by simonw 2 years ago
- Test improvements and fixed deprecation warnings (#2464) * `asyncio_default_fixture_loop_scope = function` * Fix a bunch of BeautifulSoup deprecation warnings * Fix for PytestUnraisableExceptionWar... — committed to simonw/datasette by simonw 2 years ago
Incredibly useful command I just figured out for running the tests under a specific Python version: