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

Method test_bad_args

Lib/test/test_compileall.py:1012–1024  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1010 hardlink_dupes=dedup, force=force)
1011
1012 def test_bad_args(self):
1013 # Bad arguments combination, hardlink deduplication make sense
1014 # only for more than one optimization level
1015 with self.temporary_directory():
1016 self.make_script("pass")
1017 with self.assertRaises(ValueError):
1018 compileall.compile_dir(self.path, quiet=True, optimize=0,
1019 hardlink_dupes=True)
1020 with self.assertRaises(ValueError):
1021 # same optimization level specified twice:
1022 # compile_dir() removes duplicates
1023 compileall.compile_dir(self.path, quiet=True, optimize=[0, 0],
1024 hardlink_dupes=True)
1025
1026 def create_code(self, docstring=False, assertion=False):
1027 lines = []

Callers

nothing calls this directly

Calls 4

temporary_directoryMethod · 0.95
make_scriptMethod · 0.95
compile_dirMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected