Skip to content

test_curses regression in 3.16.0a1: test_newterm fails on a real terminal that's not 80x25 #159394

Open

Description

@mgorny

Bug report

The test seems to be written with the wrong assumption that curses will always evaluate the terminal size to 80x25, which fails when tests are run on a real terminal rather than GHA:

======================================================================
FAIL: test_newterm (test.test_curses.ScreenTests.test_newterm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.16.0_alpha1/work/Python-3.16.0a1/Lib/test/test_curses.py", line 3336, in test_newterm
    self.assertEqual(win.getmaxyx(), (24, 80))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (24, 135) != (24, 80)

First differing element 1:
135
80

- (24, 135)
+ (24, 80)

----------------------------------------------------------------------
Ran 189 tests in 4.068s

FAILED (failures=1, skipped=4)

CPython versions tested on:

3.16

Operating systems tested on:

Linux

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-cursestype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions