forked from enviPath/enviPy
30 lines
798 B
Python
30 lines
798 B
Python
from django.test import TestCase
|
|
|
|
from epdb.logic import SNode, SEdge
|
|
|
|
|
|
class SObjectTest(TestCase):
|
|
def setUp(self):
|
|
pass
|
|
|
|
def test_snode_eq(self):
|
|
snode1 = SNode("CN1C2C(N(C(N(C)C=2N=C1)=O)C)=O", 0)
|
|
snode2 = SNode("CN1C2C(N(C(N(C)C=2N=C1)=O)C)=O", 0)
|
|
assert snode1 == snode2
|
|
|
|
def test_snode_hash(self):
|
|
pass
|
|
|
|
def test_sedge_eq(self):
|
|
sedge1 = SEdge(
|
|
[SNode("CN1C2C(N(C(N(C)C=2N=C1)=O)C)=O", 0)],
|
|
[SNode("CN1C(=O)NC2=C(C1=O)N(C)C=N2", 1), SNode("C=O", 1)],
|
|
rule=None,
|
|
)
|
|
sedge2 = SEdge(
|
|
[SNode("CN1C2C(N(C(N(C)C=2N=C1)=O)C)=O", 0)],
|
|
[SNode("CN1C(=O)NC2=C(C1=O)N(C)C=N2", 1), SNode("C=O", 1)],
|
|
rule=None,
|
|
)
|
|
assert sedge1 == sedge2
|