| 1 |
from os import path |
| 2 |
|
| 3 |
extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), "syntax_plugin") |
| 4 |
|
| 5 |
|
| 6 |
def test_nosyntax(testbot): |
| 7 |
assert testbot.bot.commands["foo_nosyntax"]._err_command_syntax is None |
| 8 |
|
| 9 |
|
| 10 |
def test_syntax(testbot): |
| 11 |
assert testbot.bot.commands["foo"]._err_command_syntax == "[optional] <mandatory>" |
| 12 |
|
| 13 |
|
| 14 |
def test_re_syntax(testbot): |
| 15 |
assert testbot.bot.re_commands["re_foo"]._err_command_syntax == ".*" |
| 16 |
|
| 17 |
|
| 18 |
def test_arg_syntax(testbot): |
| 19 |
assert ( |
| 20 |
testbot.bot.commands["arg_foo"]._err_command_syntax |
| 21 |
== "[-h] [--repeat-count REPEAT] value" |
| 22 |
) |