File: specials.py

package info (click to toggle)
pgcli 4.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,476 kB
  • sloc: python: 10,390; sh: 67; makefile: 8
file content (31 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Steps for behavioral style tests are defined in this module.
Each step is defined by the string decorating it.
This string is used to call the step in "*.feature" file.
"""

from behave import when, then
import wrappers


@when("we refresh completions")
def step_refresh_completions(context):
    """
    Send refresh command.
    """
    context.cli.sendline("\\refresh")


@then("we see completions refresh started")
def step_see_refresh_started(context):
    """
    Wait to see refresh output.
    """
    wrappers.expect_pager(
        context,
        [
            "Auto-completion refresh started in the background.\r\n",
            "Auto-completion refresh restarted.\r\n",
        ],
        timeout=2,
    )