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

Method test_read_text

Lib/test/test_importlib/metadata/test_api.py:73–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 )
72
73 def test_read_text(self):
74 tests = [
75 ('egginfo-pkg', 'mod\n'),
76 ('egg_with_no_modules-pkg', '\n'),
77 ]
78 for pkg_name, expect_content in tests:
79 with self.subTest(pkg_name):
80 top_level = [
81 path for path in files(pkg_name) if path.name == 'top_level.txt'
82 ][0]
83 self.assertEqual(top_level.read_text(), expect_content)
84
85 def test_entry_points(self):
86 eps = entry_points()

Callers

nothing calls this directly

Calls 4

filesFunction · 0.90
subTestMethod · 0.45
assertEqualMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected