Skip to content

Commit

Permalink
dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsekar committed Feb 11, 2022
1 parent 9f81ccc commit 5afd8ef
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_rete/test_rete_channel_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from wc_rules.matcher.functionalize2 import *
from wc_rules.matcher.core import *
from wc_rules.schema.base import BaseClass
from wc_rules.graph.examples import *
from wc_rules.graph.canonical_labeling import canonical_label
import unittest

class X(BaseClass):
pass
class Y(X):
pass

def make_token(entry={},action=''):
return {'entry':entry,'action':action}

class TestReteChannelFunctions(unittest.TestCase):

def test_pass_channel(self):
pass
11 changes: 11 additions & 0 deletions tests/test_rete/test_rete_initialization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from wc_rules.matcher.functionalize2 import *
from wc_rules.matcher.core import *
from wc_rules.schema.base import BaseClass
from wc_rules.graph.examples import *
from wc_rules.graph.canonical_labeling import canonical_label
import unittest

# imports classes from wc_rules.graph.examples

class TestReteInitialization(unittest.TestCase):
def test_initialize_class(self):
10 changes: 10 additions & 0 deletions wc_rules/matcher/functionalize2.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ def __call__(self,net,node,elem):
node.state.outgoing.extend(outgoing)
return net

class ChannelBehavior(Behavior):

def __call__(self,net,channel,elem):
if self.entry_check(channel,elem):
if isinstance(self.actions,SuperSet):
fn = getattr(self,'do')
else:
fn = getattr(self,f"do_{elem['action']}")
return net

class StartNode(NodeBehavior):
callsign = 'start'

Expand Down

0 comments on commit 5afd8ef

Please sign in to comment.