Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 8191ac7

Browse files
committed
Allow to use from ui_cli.tests import message_recorder
Shorter imports for users of this fixture :)
1 parent 955fa6c commit 8191ac7

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

cli_ui/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .conftest import message_recorder

docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Highlights
1414
* **Breaking change** Instead of hard-coding ANSI sequences names and values, use `colorama` instead.
1515
All existing names have been kept, but some of the values changed slighlty.
1616

17-
18-
1917
* ``ask_`` functions now take a variable number of tokens as first argument.
2018
This allows to color the prompt when requiring input from the user, for instance::
2119

@@ -39,6 +37,8 @@ Other Changes
3937

4038
* Annotate everything with ``mypy``.
4139
* Use ``black`` for automatic code formatting.
40+
* If you nedd the ``record_message()`` pytest fixture in your own tests, you can now
41+
import it with ``from cli_ui.tests import message_recorder``.
4242

4343
v0.7.4
4444
++++++

docs/index.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Python CLI UI
1111

1212
Tools for nice user interfaces in the terminal.
1313

14+
.. contents::
15+
1416
Installation
1517
-------------
1618

@@ -363,11 +365,11 @@ Auto-correct
363365
Testing with pytest
364366
++++++++++++++++++++
365367

366-
.. autofunction:: cli_ui.tests.conftest.message_recorder
368+
.. autofunction:: cli_ui.tests.message_recorder
367369

368370
::
369371

370-
from cli_ui.tests.conftest import message_recorder
372+
from cli_ui.tests import message_recorder
371373

372374

373375
def foo():

0 commit comments

Comments
 (0)