# Path: cardinal/decorators.py
# _RETYPE = type(re.compile('foobar'))
# def command(triggers):
#     def wrap(f):
# def regex(expression):
#     def wrap(f):
# def help(lines):
#     def wrap(f):
# def event(triggers):
#     def wrap(f):


import pytest
from cardinal import decorators



@pytest.mark.parametrize("input,expected", [
    ('foo', ['foo']),
    (['foo'], ['foo']),
    (['foo', 'bar'], ['foo', 'bar']),
])
def test_command(input, expected):
    # ensure commands is a list with foo added
    @decorators.command(input)
    def foo():
        pass

    assert foo.commands == expected


def test_command_overwrites():
    # test that only one decorator can add commands

# Path: cardinal/decorators.py
# _RETYPE = type(re.compile('foobar'))
# def command(triggers):
#     def wrap(f):
# def regex(expression):
#     def wrap(f):
# def help(lines):
#     def wrap(f):
# def event(triggers):
#     def wrap(f):


# Path: cardinal/test_decorators.py
import pytest
from cardinal import decorators




@pytest.mark.parametrize("input,expected", [
    ('foo', ['foo']),
    (['foo'], ['foo']),
    (['foo', 'bar'], ['foo', 'bar']),
])
def test_command(input, expected):
    # ensure commands is a list with foo added
    @decorators.command(input)
    def foo():
        pass

    assert foo.commands == expected


def test_command_overwrites():
    # test that only one decorator can add commands

    @decorators.command('foo')