<commit_before># -*- coding: utf-8
from __future__ import unicode_literals

import wrappers
from behave import when, then


@when('we run container {container_name} with image {image_name} and command {command} and options {options}')
def step_run_container_with_command(context, container_name, image_name, command, options):
    """
    Send "run" with command.
    """
    context.cli.sendline('run {3} --name {0} {1} {2}'.format(
        container_name,
        image_name,
        command,
        options))


@when('we run container {container_name} with image {image_name}')
def step_run_container(context, container_name, image_name):
    """
    Send "run" with command.
    """
    context.cli.sendline('run --name {0} {1}'.format(
        container_name,
        image_name))


@when('we execute {command_name} in container {container_name}')
def step_exec_command(context, command_name, container_name):
    """
    Send "run" command.
    """
    context.cli.sendline('exec {0} {1}'.format(container_name, command_name))


@when('we stop container {container_name}')
def step_stop_container(context, container_name):
    """
    Send "stop" command.
    """
    context.cli.sendline('stop {0}'.format(container_name))


@when('we remove container {name}')
def step_remove_container(context, name):
    """
    Send "rm" command.
    """
    context.cli.sendline('rm {0}'.format(name))


@when('we force remove container {name}')
def step_force_remove_container(context, name):
    """
    Send "rm -f" command.
    """
    context.cli.sendline('rm -f {0}'.format(name))


@when('we attach to container {name}')
def step_attach_container(context, name):
    """
    Send "attach" command.
    """
    context.cli.sendline('attach --detach-keys "ctrl-q" {0}'.format(name))

<commit_msg>Attampt to fix attach test.<commit_after># -*- coding: utf-8
from __future__ import unicode_literals

import wrappers
from behave import when, then


@when('we run container {container_name} with image {image_name} and command {command} and options {options}')
def step_run_container_with_command(context, container_name, image_name, command, options):
    """
    Send "run" with command.
    """
    context.cli.sendline('run {3} --name {0} {1} {2}'.format(
        container_name,
        image_name,
        command,
        options))


@when('we run container {container_name} with image {image_name}')
def step_run_container(context, container_name, image_name):
    """
    Send "run" with command.
    """
    context.cli.sendline('run --name {0} {1}'.format(
        container_name,
        image_name))


@when('we execute {command_name} in container {container_name}')
def step_exec_command(context, command_name, container_name):
    """
    Send "run" command.
    """
    context.cli.sendline('exec {0} {1}'.format(container_name, command_name))


@when('we stop container {container_name}')
def step_stop_container(context, container_name):
    """
    Send "stop" command.
    """
    context.cli.sendline('stop {0}'.format(container_name))


@when('we remove container {name}')
def step_remove_container(context, name):
    """
    Send "rm" command.
    """
    context.cli.sendline('rm {0}'.format(name))


@when('we force remove container {name}')
def step_force_remove_container(context, name):
    """
    Send "rm -f" command.
    """
    context.cli.sendline('rm -f {0}'.format(name))


@when('we attach to container {name}')
def step_attach_container(context, name):
    """
    Send "attach" command.
    """
    context.cli.sendline('attach --detach-keys ctrl-q {0}'.format(name))


{'fraction_non_alphanumeric': 0.14891846921797006, 'fraction_numerical': 0.007210205213533, 'mean_word_length': 3.822192513368984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2484694', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1147, 'n_words': 282}