textual fails to build from source due to extra whitespaces in test

Bug #2088034 reported by Vladimir Petko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
textual (Ubuntu)
New
Undecided
Unassigned

Bug Description

Textual builds from source locally, but when built by CI, the tests fails due to extra whitespaces in the returned value:

tests/input/test_input_value_visibility.py::test_input_value_visible_on_instantiation !<textual.widgets._input._InputRenderable object at 0x767b1c4be1e0>!
!value !
FAILED [ 19%]

=================================== FAILURES ===================================
__________________ test_input_value_visible_on_instantiation ___________________

    async def test_input_value_visible_on_instantiation():
        """Check if the full input value is rendered if the input is instantiated with it."""

        class MyApp(App):
            def compose(self):
                yield Input(value="value")

        app = MyApp()
        async with app.run_test():
            console = Console(width=5)
            with console.capture() as capture:
                render = app.query_one(Input).render()
                print("!" + str(render)+ "!")
                console.print(app.query_one(Input).render())
            print("!" + str(capture.get()) + "!")
> assert capture.get() == "value"
E AssertionError: assert 'value ' == 'value'
E
E - value
E + value

tests/input/test_input_value_visibility.py:22: AssertionError
=========================== short test summary info ============================
FAILED tests/input/test_input_value_visibility.py::test_input_value_visible_on_instantiation - AssertionError: assert 'value ' == 'value'

  - value
  + value
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!

Vladimir Petko (vpa1977)
tags: added: ftbfs update-excuse
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.