mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +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">
|
<module type="PYTHON_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<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>
|
|
||||||
<orderEntry type="jdk" jdkName="Poetry (royalnet-console)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Poetry (royalnet-console)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
from royalnet_console.pda import ConsolePDA
|
from royalnet_console.pda import ConsolePDA
|
||||||
from royalnet.engineer import PartialCommand, Sentry, Message
|
import royalnet.engineer as engi
|
||||||
|
|
||||||
|
|
||||||
def test_construction():
|
def test_construction():
|
||||||
|
@ -15,22 +15,19 @@ def pda():
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def command():
|
def command():
|
||||||
@PartialCommand.new(syntax="")
|
@engi.PartialCommand.new(syntax="")
|
||||||
async def test(*, _sentry: Sentry, _msg: Message, **__):
|
async def test(*, _sentry: engi.Sentry, _msg: engi.Message, **__):
|
||||||
"""
|
|
||||||
Ah, non lo so io!
|
|
||||||
"""
|
|
||||||
await _msg.reply(text=r"test")
|
await _msg.reply(text=r"test")
|
||||||
|
|
||||||
return test
|
return test
|
||||||
|
|
||||||
|
|
||||||
def test_registration(pda: ConsolePDA, command: PartialCommand):
|
def test_registration(pda: ConsolePDA, command: engi.PartialCommand):
|
||||||
pda.register_partial(command, ["test"])
|
pda.register_partial(command, ["test"])
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def pda_with_command(pda: ConsolePDA, command: PartialCommand):
|
def pda_with_command(pda: ConsolePDA, command: engi.PartialCommand):
|
||||||
pda.register_partial(command, ["test"])
|
pda.register_partial(command, ["test"])
|
||||||
return pda
|
return pda
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue