MCPcopy Create free account
hub / github.com/bpython/bpython / test_get_source_file

Method test_get_source_file

bpython/test/test_inspection.py:105–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103 self.assertEqual(inspect.getsource(encoding_latin1.foo), foo_non_ascii)
104
105 def test_get_source_file(self):
106 path = os.path.join(os.path.dirname(__file__), "fodder")
107
108 encoding = inspection.get_encoding_file(
109 os.path.join(path, "encoding_ascii.py")
110 )
111 self.assertEqual(encoding, "ascii")
112 encoding = inspection.get_encoding_file(
113 os.path.join(path, "encoding_latin1.py")
114 )
115 self.assertEqual(encoding, "latin1")
116 encoding = inspection.get_encoding_file(
117 os.path.join(path, "encoding_utf8.py")
118 )
119 self.assertEqual(encoding, "utf-8")
120
121 @unittest.skipIf(pypy, "pypy builtin signatures aren't complete")
122 def test_getfuncprops_print(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected