OILS / opy / callgraph_test.py View on Github | oilshell.org

31 lines, 16 significant
1#!/usr/bin/env python2
2from __future__ import print_function
3"""
4callgraph_test.py: Tests for callgraph.py
5"""
6
7import unittest
8import sys
9
10from _devbuild.gen import types_asdl
11
12from opy import callgraph # module under test
13
14lex_mode_e = types_asdl.lex_mode_e
15
16class CallgraphTest(unittest.TestCase):
17
18 def testFoo(self):
19 # Figuring out how to inspect ASDL types
20
21 print(lex_mode_e)
22 print(dir(lex_mode_e))
23 print(lex_mode_e.__module__)
24 print(sys.modules[lex_mode_e.__module__])
25 print(sys.modules[lex_mode_e.__module__].__file__)
26
27 print(callgraph)
28
29
30if __name__ == '__main__':
31 unittest.main()