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

Method setUp

Lib/test/test_argparse.py:2024–2029  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2022 """Test the FileType option/argument type for reading files"""
2023
2024 def setUp(self):
2025 super(TestFileTypeRB, self).setUp()
2026 for file_name in ['foo', 'bar']:
2027 with open(os.path.join(self.temp_dir, file_name),
2028 'w', encoding="utf-8") as file:
2029 file.write(file_name)
2030
2031 argument_signatures = [
2032 Sig('-x', type=FileType('rb')),

Callers

nothing calls this directly

Calls 5

superClass · 0.85
openFunction · 0.50
setUpMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected