Skip to content

Commit

Permalink
Set COLUMNS to the PREDEFINED_TERMINAL_SIZE for 3.7 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed Feb 21, 2022
1 parent d14e054 commit e4ff88d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_cli_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def ignore_terminal_size(monkeypatch):
def fake_terminal_size(*args, **kwargs):
return os.terminal_size(PREDEFINED_TERMINAL_SIZE)

# Setting COLUMNS as an env var is required for 3.8<
monkeypatch.setitem(os.environ, 'COLUMNS', str(PREDEFINED_TERMINAL_SIZE[0]))
monkeypatch.setattr(shutil, "get_terminal_size", fake_terminal_size)


Expand Down

0 comments on commit e4ff88d

Please sign in to comment.