File: syntax_test.py

package info (click to toggle)
errbot 6.2.0%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,848 kB
  • sloc: python: 11,573; makefile: 162; sh: 97
file content (22 lines) | stat: -rw-r--r-- 590 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
from os import path

extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), "syntax_plugin")


def test_nosyntax(testbot):
    assert testbot.bot.commands["foo_nosyntax"]._err_command_syntax is None


def test_syntax(testbot):
    assert testbot.bot.commands["foo"]._err_command_syntax == "[optional] <mandatory>"


def test_re_syntax(testbot):
    assert testbot.bot.re_commands["re_foo"]._err_command_syntax == ".*"


def test_arg_syntax(testbot):
    assert (
        testbot.bot.commands["arg_foo"]._err_command_syntax
        == "[-h] [--repeat-count REPEAT] value"
    )