Skip to content

test_compute_wrap_offsets failures #6404

@mcepl

Description

@mcepl

Have you checked closed issues? (https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed)

yes

Have you checked against the most recent version of Textual? (https://pypi.org/search/?q=textual)

yes, 8.0.1

The bug

[  182s] =================================== FAILURES ===================================
[  182s] _____ test_compute_wrap_offsets[\t\t\tfo bar baz\t-20-4-expected_output8] ______
[  182s] 
[  182s] text = '\t\t\tfo bar baz\t', width = 20, tab_size = 4, expected_output = [10]
[  182s] 
[  182s]     @pytest.mark.parametrize(
[  182s]         "text, width, tab_size, expected_output",
[  182s]         [
[  182s]             ("", 6, 4, []),
[  182s]             ("\t", 6, 4, []),
[  182s]             ("    ", 6, 4, []),
[  182s]             ("foo bar baz", 6, 4, [4, 8]),
[  182s]             ("\tfoo bar baz", 6, 4, [1, 5, 9]),
[  182s]             ("\tfo bar baz", 6, 4, [1, 4, 8]),
[  182s]             ("\tfo bar baz", 6, 8, [1, 4, 8]),
[  182s]             ("\tfo bar baz\t", 6, 8, [1, 4, 8]),
[  182s]             ("\t\t\tfo bar baz\t", 20, 4, [10]),
[  182s]             ("\t\t\t\t\t\t\t\tfo bar bar", 19, 4, [4, 11]),
[  182s]             ("\t\t\t\t\t", 19, 4, [4]),
[  182s]         ],
[  182s]     )
[  182s]     def test_compute_wrap_offsets(text, width, tab_size, expected_output):
[  182s] >       assert compute_wrap_offsets(text, width, tab_size) == expected_output
[  182s] E       AssertionError: assert [6] == [10]
[  182s] E         
[  182s] E         At index 0 diff: 6 != 10
[  182s] E         
[  182s] E         Full diff:
[  182s] E           [
[  182s] E         -     10,
[  182s] E         ?     ^^...
[  182s] E         
[  182s] E         ...Full output truncated (3 lines hidden), use '-vv' to show
[  182s] 
[  182s] tests/test_wrap.py:43: AssertionError
[  182s] _ test_compute_wrap_offsets[\t\t\t\t\t\t\t\tfo bar bar-19-4-expected_output9] __
[  182s] 
[  182s] text = '\t\t\t\t\t\t\t\tfo bar bar', width = 19, tab_size = 4
[  182s] expected_output = [4, 11]
[  182s] 
[  182s]     @pytest.mark.parametrize(
[  182s]         "text, width, tab_size, expected_output",
[  182s]         [
[  182s]             ("", 6, 4, []),
[  182s]             ("\t", 6, 4, []),
[  182s]             ("    ", 6, 4, []),
[  182s]             ("foo bar baz", 6, 4, [4, 8]),
[  182s]             ("\tfoo bar baz", 6, 4, [1, 5, 9]),
[  182s]             ("\tfo bar baz", 6, 4, [1, 4, 8]),
[  182s]             ("\tfo bar baz", 6, 8, [1, 4, 8]),
[  182s]             ("\tfo bar baz\t", 6, 8, [1, 4, 8]),
[  182s]             ("\t\t\tfo bar baz\t", 20, 4, [10]),
[  182s]             ("\t\t\t\t\t\t\t\tfo bar bar", 19, 4, [4, 11]),
[  182s]             ("\t\t\t\t\t", 19, 4, [4]),
[  182s]         ],
[  182s]     )
[  182s]     def test_compute_wrap_offsets(text, width, tab_size, expected_output):
[  182s] >       assert compute_wrap_offsets(text, width, tab_size) == expected_output
[  182s] E       AssertionError: assert [4, 8] == [4, 11]
[  182s] E         
[  182s] E         At index 1 diff: 8 != 11
[  182s] E         
[  182s] E         Full diff:
[  182s] E           [
[  182s] E               4,
[  182s] E         -     11,...
[  182s] E         
[  182s] E         ...Full output truncated (4 lines hidden), use '-vv' to show
[  182s] 
[  182s] tests/test_wrap.py:43: AssertionError
[  182s] =========================== short test summary info ============================
[  182s] FAILED tests/test_wrap.py::test_compute_wrap_offsets[\t\t\tfo bar baz\t-20-4-expected_output8]
[  182s] FAILED tests/test_wrap.py::test_compute_wrap_offsets[\t\t\t\t\t\t\t\tfo bar bar-19-4-expected_output9]
[  182s] = 2 failed, 2941 passed, 1 skipped, 26 deselected, 4 xfailed in 165.74s (0:02:45) =

It will be helpful if you run the following command and paste the results:

textual diagnose

Well, it doesn't work very well in the build environment, but here is the log:

_log-diagnose.txt

And this is the complete build without that textual diagnose so that tests are run

_log.txt

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