Skip to content

expect

curtaincall.expect.expect(target)

Create assertions on a locator or terminal.

Usage

expect(term.get_by_text("Hello")).to_be_visible() expect(term).to_match_snapshot()

curtaincall.expect.LocatorAssertions

Assertions on a Locator with auto-waiting.

to_be_visible(*, timeout=5.0)

Assert the locator's text is visible on screen.

not_to_be_visible(*, timeout=5.0)

Assert the locator's text is NOT visible on screen.

to_have_fg_color(color, *, timeout=5.0)

Assert the matched text has the expected foreground color.

to_have_bg_color(color, *, timeout=5.0)

Assert the matched text has the expected background color.

to_contain_text(text, *, timeout=5.0)

Assert the matched text contains the given substring.

curtaincall.expect.TerminalAssertions

Assertions on a Terminal with auto-waiting.

to_have_exited(*, timeout=10.0)

Assert that the terminal's process has exited.

to_match_snapshot()

Return the terminal snapshot for comparison.