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

Method _test_module_encoding

Lib/test/test_argparse.py:6173–6177  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

6171class TestEncoding(TestCase):
6172
6173 def _test_module_encoding(self, path):
6174 path, _ = os.path.splitext(path)
6175 path += ".py"
6176 with open(path, 'r', encoding='utf-8') as f:
6177 f.read()
6178
6179 def test_argparse_module_encoding(self):
6180 self._test_module_encoding(argparse.__file__)

Calls 3

splitextMethod · 0.80
openFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected