Skip to content

Test failures in tests/text_area/test_languages.py #5449

@eljamm

Description

@eljamm

I'm trying to compile textual 1.0.0 for nixpkgs, but these two tests are failing:

  • tests/text_area/test_languages.py::test_setting_unknown_language
  • tests/text_area/test_languages.py::test_update_highlight_query

Here is the full log:

============================= test session starts ==============================
platform linux -- Python 3.12.8, pytest-8.3.3, pluggy-1.5.0
rootdir: /build/source
configfile: pyproject.toml
testpaths: tests
plugins: aiohttp-1.0.5, asyncio-0.23.8, xdist-3.6.1, syrupy-4.8.0, time-machine-2.15.0
asyncio: mode=Mode.AUTO
12 workers [2751 items]  m
........................................................................ [  2%]
............................................x........................... [  5%]
........................................................................ [  7%]
........................................................................ [ 10%]
........................................................................ [ 13%]
........................................................................ [ 15%]
........................................................................ [ 18%]
........................................................................ [ 20%]
........................................................................ [ 23%]
........................................................................ [ 26%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 34%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 41%]
......................................x................................. [ 44%]
........................................................................ [ 47%]
........................................................................ [ 49%]
........................................................................ [ 52%]
..............x......................................................... [ 54%]
........................................................................ [ 57%]
........................................................................ [ 60%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 68%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 75%]
........................................................................ [ 78%]
........................................................................ [ 81%]
..................s..................................................... [ 83%]
.............x.......................................................... [ 86%]
........................................................................ [ 88%]
...............................................F...........F............ [ 91%]
........................................................................ [ 94%]
........................................................................ [ 96%]
........................................................................ [ 99%]
...............                                                          [100%]
=================================== FAILURES ===================================
________________________ test_setting_unknown_language _________________________
[gw7] linux -- Python 3.12.8 /nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12

    @pytest.mark.syntax
    async def test_setting_unknown_language():
        app = TextAreaApp()
        async with app.run_test():
            text_area = app.query_one(TextArea)

>           with pytest.raises(LanguageDoesNotExist):
E           Failed: DID NOT RAISE <class 'textual.widgets._text_area.LanguageDoesNotExist'>

tests/text_area/test_languages.py:59: Failed
_________________________ test_update_highlight_query __________________________
[gw8] linux -- Python 3.12.8 /nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12

    @pytest.mark.syntax
    async def test_update_highlight_query():
        app = TextAreaApp()
        async with app.run_test():
            text_area = app.query_one(TextArea)

            # Before registering the language, we have highlights as expected.
>           assert len(text_area._highlights) > 0
E           AssertionError: assert 0 > 0
E            +  where 0 = len(defaultdict(<class 'list'>, {}))
E            +    where defaultdict(<class 'list'>, {}) = TextArea()._highlights

tests/text_area/test_languages.py:89: AssertionError
=============================== warnings summary ===============================
../../nix/store/zx6gfbpzcs60wnbd8d1fd2m7hnim3pvq-python3.12-pytest-8.3.3/lib/python3.12/site-packages/_pytest/config/__init__.py:1441: 13 warnings
  /nix/store/zx6gfbpzcs60wnbd8d1fd2m7hnim3pvq-python3.12-pytest-8.3.3/lib/python3.12/site-packages/_pytest/config/__init__.py:1441: PytestConfigWarning: Unknown config option: asyncio_default_fixture_loop_scope

    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

tests/test_reactive.py::test_external_watch_init_does_not_propagate
  /nix/store/01z5nb9glflqqbf4z11m0aiq3jiadk13-python3.12-textual-1.0.0/lib/python3.12/site-packages/textual/css/tokenizer.py:264: RuntimeWarning: coroutine 'test_async_reactive_watch_callbacks_go_on_the_watcher.<locals>.MyApp.callback' was never awaited
    for name, value in zip(expect.names, iter_groups):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/text_area/test_languages.py::test_setting_unknown_language - Failed: DID NOT RAISE <class 'textual.widgets._text_area.LanguageDoesNotExi...
FAILED tests/text_area/test_languages.py::test_update_highlight_query - AssertionError: assert 0 > 0
====== 2 failed, 2744 passed, 1 skipped, 4 xfailed, 14 warnings in 21.11s ======

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions