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

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