Debian Codegraph @

issue.features/steps/ansi_steps.py

raw
1 # -*- coding: utf-8 -*-
2
3 from __future__ import absolute_import
4 from behave import then
5 from behave4cmd0.command_steps import \
6 step_command_output_should_contain_text, \
7 step_command_output_should_not_contain_text
8
9 # -- CONSTANTS:
10 # ANSI CONTROL SEQUENCE INTRODUCER (CSI).
11 CSI = u"\x1b["
12
13 @then(u'the command output should contain ANSI escape sequences')
14 def step_command_ouput_should_contain_ansi_sequences(context):
15 step_command_output_should_contain_text(context, CSI)
16
17 @then(u'the command output should not contain any ANSI escape sequences')
18 def step_command_ouput_should_not_contain_ansi_sequences(context):
19 step_command_output_should_not_contain_text(context, CSI)