Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 22 lines (14 sloc) 0.487 kb
9bbbddc Yves Müller remove long running timer problem, improve api and parse quantors
authored
1 import unittest
2 import parser as p
3 from fofTypes import *
4
5 def _fofify(formula_str):
6 return "fof(ax, axiom, " + formula_str + ")."
7
8 class PaserTest(unittest.TestCase):
9
10
11 def test_quantor(self):
12 string = _fofify(" ? [ X, Y, Z] : ( a | b ) ")
13
14 result = p.parse_string(string)[0]
15 quantor = result["formula"]
16 self.assertEqual(type(quantor), Quantor)
17 self.assertEqual(len(quantor.variables), 3)
18
19 if __name__ == '__main__':
20 unittest.main()
21
Something went wrong with that request. Please try again.