Beispiel #1
0
 def test_fapply_failure(self):
     # An application that should fail
     sign0 = sign_from_string(r"V^D / I^DT : \$x.leftonto($x)")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.bapply.apply_rule([sign0, sign1])
     # Check this failed as expected
     self.assertEqual(results, None)
Beispiel #2
0
 def test_fapply_failure(self):
     # An application that should fail
     sign0 = sign_from_string(r"V^D / I^DT : \$x.leftonto($x)")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.bapply.apply_rule([sign0, sign1])
     # Check this failed as expected
     self.assertEqual(results, None)
Beispiel #3
0
 def test_fapply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"III^T : [<0,1>]")
     sign1 = sign_from_string(r"IV^T \ III^T : \$x.$x")
     results = self.bapply.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"III^T - IV^T : [<0,1>]")
     self.assertIsNotNone(results, 
         msg="rule application failed: %s on %s and %s" % (self.bapply, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #4
0
 def test_fapply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"V^D / I^DT : \$x.leftonto($x)")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.fapply.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"V^D - I^T : [leftonto(<0,0>)]")
     self.assertIsNotNone(results, 
         msg="rule application failed: %s on %s and %s" % (self.fapply, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #5
0
 def test_apply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"bVII^D /{c} III^TD : \$x.leftonto(leftonto($x))")
     sign1 = sign_from_string(r"IV^D /{c} III^T : \$y.leftonto($y)")
     results = self.coord.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"bVII^D /{c} III^T : (\$x.leftonto(leftonto($x))) & (\$y.leftonto($y))")
     self.assertIsNotNone(results, 
         msg="rule application failed: %s on %s and %s" % (self.coord, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #6
0
 def test_apply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"bVII^D - III^T : [leftonto(<1,2>), <3,4>]")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.devel.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"bVII^D - I^T : [leftonto(<1,2>), <3,4>, <0,0>]")
     self.assertIsNotNone(results, 
         msg="rule application failed: %s on %s and %s" % (self.devel, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #7
0
 def test_fapply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"III^T : [<0,1>]")
     sign1 = sign_from_string(r"IV^T \ III^T : \$x.$x")
     results = self.bapply.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"III^T - IV^T : [<0,1>]")
     self.assertIsNotNone(results,
                          msg="rule application failed: %s on %s and %s" %
                          (self.bapply, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #8
0
 def test_fapply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"V^D / I^DT : \$x.leftonto($x)")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.fapply.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(r"V^D - I^T : [leftonto(<0,0>)]")
     self.assertIsNotNone(results,
                          msg="rule application failed: %s on %s and %s" %
                          (self.fapply, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #9
0
 def test_apply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(r"bVII^D - III^T : [leftonto(<1,2>), <3,4>]")
     sign1 = sign_from_string(r"I^T : [<0,0>]")
     results = self.devel.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(
         r"bVII^D - I^T : [leftonto(<1,2>), <3,4>, <0,0>]")
     self.assertIsNotNone(results,
                          msg="rule application failed: %s on %s and %s" %
                          (self.devel, sign0, sign1))
     self.assertEqual(results[0], correct)
Beispiel #10
0
 def test_apply_success(self):
     # An application that should succeed
     sign0 = sign_from_string(
         r"bVII^D /{c} III^TD : \$x.leftonto(leftonto($x))")
     sign1 = sign_from_string(r"IV^D /{c} III^T : \$y.leftonto($y)")
     results = self.coord.apply_rule([sign0, sign1])
     # Check this gave the expected result
     correct = sign_from_string(
         r"bVII^D /{c} III^T : (\$x.leftonto(leftonto($x))) & (\$y.leftonto($y))"
     )
     self.assertIsNotNone(results,
                          msg="rule application failed: %s on %s and %s" %
                          (self.coord, sign0, sign1))
     self.assertEqual(results[0], correct)