MCPcopy Index your code
hub / github.com/RustPython/RustPython / setUp

Method setUp

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

Source from the content-addressed store, hash-verified

1713 """Test reading arguments from a file"""
1714
1715 def setUp(self):
1716 super(TestArgumentsFromFile, self).setUp()
1717 file_texts = [
1718 ('hello', os.fsencode(self.hello) + b'\n'),
1719 ('recursive', b'-a\n'
1720 b'A\n'
1721 b'@hello'),
1722 ('invalid', b'@no-such-path\n'),
1723 ('undecodable', self.undecodable + b'\n'),
1724 ]
1725 for path, text in file_texts:
1726 with open(path, 'wb') as file:
1727 file.write(text)
1728
1729 parser_signature = Sig(fromfile_prefix_chars='@')
1730 argument_signatures = [

Callers

nothing calls this directly

Calls 5

superClass · 0.85
fsencodeMethod · 0.80
openFunction · 0.50
setUpMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected