# Path: cli_bdd/core/steps/base.py
# class StepBase(object):
#     type_ = None  # given, when, then
#     sentence = None
#     func_name = None
# 
#     def build_step_func(self):
#         raise NotImplementedError()
# 
#     def get_table(self):
#         raise NotImplementedError()
# 
#     def get_text(self):
#         raise NotImplementedError()
# 
#     def get_scenario_context(self):
#         raise NotImplementedError()


import difflib
import StringIO
import pexpect
from hamcrest import (
    assert_that,
    contains_string,
    equal_to,
    greater_than,
    greater_than_or_equal_to,
    is_,
    is_not,
    less_than,
    less_than_or_equal_to
)
from cli_bdd.core.steps.base import StepBase




def run(command, fail_on_error=False, interactively=False, timeout=30):
    child = pexpect.spawn('/bin/sh', ['-c', command], echo=False)
    child.logfile_read = StringIO.StringIO()
    child.logfile_send = StringIO.StringIO()
    if not interactively:

# Path: cli_bdd/core/steps/base.py
# class StepBase(object):
#     type_ = None  # given, when, then
#     sentence = None
#     func_name = None
# 
#     def build_step_func(self):
#         raise NotImplementedError()
# 
#     def get_table(self):
#         raise NotImplementedError()
# 
#     def get_text(self):
#         raise NotImplementedError()
# 
#     def get_scenario_context(self):
#         raise NotImplementedError()


# Path: cli_bdd/core/steps/command.py
import difflib
import StringIO
import pexpect
from hamcrest import (
    assert_that,
    contains_string,
    equal_to,
    greater_than,
    greater_than_or_equal_to,
    is_,
    is_not,
    less_than,
    less_than_or_equal_to
)
from cli_bdd.core.steps.base import StepBase





def run(command, fail_on_error=False, interactively=False, timeout=30):
    child = pexpect.spawn('/bin/sh', ['-c', command], echo=False)
    child.logfile_read = StringIO.StringIO()
    child.logfile_send = StringIO.StringIO()
    if not interactively:

        child.expect(pexpect.EOF, timeout=timeout)