Example #1
0
 def _test_equivalent_symbols(self):
     for left, right in self.equivalent_symbols:
         leftSurreal = shorthand(left)
         rightSurreal = shorthand(right)
         self.assertTrue(leftSurreal == rightSurreal, 
                 "%s should equal %s (Surreal: %s == %s)" % 
                 (left, right, leftSurreal, rightSurreal))
Example #2
0
 def test_not_well_formed_shorthands(self):
     for sh in self.not_well_formed:
         try:
             shorthand(sh)
             self.fail("%s should raise a BadlyFormed exception" % sh)
         except BadlyFormed:
             pass
Example #3
0
 def test_le_inequalities(self):
     for left, right in self.le_inequalities:
         self.assertTrue(shorthand(left) <= shorthand(right))
Example #4
0
 def test_well_formed_shorthands(self):
     for sh in self.well_formed:
         try:
             assert type(shorthand(sh)) == S
         except BadlyFormed:
             self.fail("%s should be well-formed" % sh)