示例#1
0
 def test_from_links_different_colors(self):
     left = Link(x=10, y=20, c_flag=5)
     right = Link(x=34, y=66, c_flag=6)
     result = Event.from_link_pair(left, right)
     self.assertIsNone(result)
示例#2
0
 def test_from_links_nonterminals(self):
     left = Link(x=10, y=20, c_flag=5)
     right = Link(x=34, y=66, c_flag=5)
     expected = Event(sx=10, sy=20, ex=34, ey=66, c_flag=5)
     result = Event.from_link_pair(left, right)
     self.assertTrue(expected == result)
示例#3
0
 def test_from_links_terminal_left(self):
     left = Link(x=10, y=20, c_flag=255)
     right = Link(x=34, y=66, c_flag=5)
     result = Event.from_link_pair(left, right)
     self.assertIsNone(result)