Skip to content

Test failures in CI: There is no current event loop in thread 'MainThread' #2461

@simonw

Description

@simonw

Oddly they don't affect all versions of Python: https://github.com/simonw/datasette/actions/runs/13096055517/job/36538457787

Image

=========================== 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions