| 1 | #!/usr/bin/env python2 | 
| 2 | """ | 
| 3 | parse_test.py: Tests for parse.py | 
| 4 | """ | 
| 5 | from __future__ import print_function | 
| 6 | |
| 7 | import unittest | 
| 8 | |
| 9 | from opy.pgen2 import parse # module under test | 
| 10 | |
| 11 | |
| 12 | class ParseTest(unittest.TestCase): | 
| 13 | |
| 14 | def testPNode(self): | 
| 15 | pnode = parse.PNode(42, ('val', 'prefix', (5, 80)), None) | 
| 16 | print(pnode) | 
| 17 | |
| 18 | pnode = parse.PNode(42, ('val', 'prefix', ('1', '2')), []) | 
| 19 | print(pnode) | 
| 20 | |
| 21 | |
| 22 | if __name__ == '__main__': | 
| 23 | unittest.main() |