OILS / pgen2 / parse_test.py View on Github | oilshell.org

23 lines, 11 significant
1#!/usr/bin/env python2
2"""
3parse_test.py: Tests for parse.py
4"""
5from __future__ import print_function
6
7import unittest
8
9from opy.pgen2 import parse # module under test
10
11
12class 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
22if __name__ == '__main__':
23 unittest.main()