| 1 | #!/usr/bin/env python2
 | 
| 2 | from __future__ import print_function
 | 
| 3 | """
 | 
| 4 | callgraph_test.py: Tests for callgraph.py
 | 
| 5 | """
 | 
| 6 | 
 | 
| 7 | import unittest
 | 
| 8 | import sys
 | 
| 9 | 
 | 
| 10 | from _devbuild.gen import types_asdl
 | 
| 11 | 
 | 
| 12 | from opy import callgraph  # module under test
 | 
| 13 | 
 | 
| 14 | lex_mode_e = types_asdl.lex_mode_e
 | 
| 15 | 
 | 
| 16 | class 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 | 
 | 
| 30 | if __name__ == '__main__':
 | 
| 31 |   unittest.main()
 |