mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 11:34:18 +00:00
💥 *things happened here*
This commit is contained in:
parent
ed9f05ba13
commit
f3af9394f5
2 changed files with 6 additions and 15 deletions
|
@ -2,13 +2,7 @@
|
|||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/royalnet_console" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/royalnet_console/tests" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/royalnet_console.egg-info" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.pytest_cache" />
|
||||
</content>
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Poetry (royalnet-console)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import pytest
|
||||
from royalnet_console.pda import ConsolePDA
|
||||
from royalnet.engineer import PartialCommand, Sentry, Message
|
||||
import royalnet.engineer as engi
|
||||
|
||||
|
||||
def test_construction():
|
||||
|
@ -15,22 +15,19 @@ def pda():
|
|||
|
||||
@pytest.fixture
|
||||
def command():
|
||||
@PartialCommand.new(syntax="")
|
||||
async def test(*, _sentry: Sentry, _msg: Message, **__):
|
||||
"""
|
||||
Ah, non lo so io!
|
||||
"""
|
||||
@engi.PartialCommand.new(syntax="")
|
||||
async def test(*, _sentry: engi.Sentry, _msg: engi.Message, **__):
|
||||
await _msg.reply(text=r"test")
|
||||
|
||||
return test
|
||||
|
||||
|
||||
def test_registration(pda: ConsolePDA, command: PartialCommand):
|
||||
def test_registration(pda: ConsolePDA, command: engi.PartialCommand):
|
||||
pda.register_partial(command, ["test"])
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def pda_with_command(pda: ConsolePDA, command: PartialCommand):
|
||||
def pda_with_command(pda: ConsolePDA, command: engi.PartialCommand):
|
||||
pda.register_partial(command, ["test"])
|
||||
return pda
|
||||
|
||||
|
|
Loading…
Reference in a new issue