File: setup_command_shell.py

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (24 lines) | stat: -rwxr-xr-x 780 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Support functionality to simplify the setup for behave tests.

.. sourcecode:: python

    # -- FILE: features/environment.py
    from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave

    def before_all(context):
        setup_command_shell_processors4behave()
"""

from __future__ import absolute_import
from .command_shell import Command
from .command_shell_proc import BehaveWinCommandOutputProcessor

def setup_command_shell_processors4behave():
    Command.POSTPROCESSOR_MAP["behave"] = []
    for processor_class in [BehaveWinCommandOutputProcessor]:
        if processor_class.enabled:
            processor = processor_class()
            Command.POSTPROCESSOR_MAP["behave"].append(processor)