MCPcopy Index your code
hub / github.com/python/cpython / test_details

Method test_details

Lib/test/test_inspect/test_inspect.py:6531–6544  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6529 self.assertEqual(lines, ["Can't get info for builtin modules."])
6530
6531 def test_details(self):
6532 module = importlib.import_module('unittest')
6533 args = support.optim_args_from_interpreter_flags()
6534 rc, out, err = assert_python_ok(*args, '-m', 'inspect',
6535 'unittest', '--details')
6536 output = out.decode()
6537 # Just a quick safety check on the output
6538 self.assertIn(module.__spec__.name, output)
6539 self.assertIn(module.__name__, output)
6540 self.assertIn(module.__spec__.origin, output)
6541 self.assertIn(module.__file__, output)
6542 if module.__spec__.cached:
6543 self.assertIn(module.__spec__.cached, output)
6544 self.assertEqual(err, b'')
6545
6546
6547class TestReload(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

assert_python_okFunction · 0.90
assertInMethod · 0.80
import_moduleMethod · 0.45
decodeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected