mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #21338: Add silent mode for compileall.
quiet parameters of compile_{dir, file, path} functions now have
a multilevel value.
Also, -q option of the CLI now have a multilevel value.
Patch by Thomas Kluyver.
This commit is contained in:
parent
41d31967c6
commit
6554b86b1f
4 changed files with 59 additions and 25 deletions
|
|
@ -347,6 +347,13 @@ class CommandLineTests(unittest.TestCase):
|
|||
self.assertNotEqual(b'', noisy)
|
||||
self.assertEqual(b'', quiet)
|
||||
|
||||
def test_silent(self):
|
||||
script_helper.make_script(self.pkgdir, 'crunchyfrog', 'bad(syntax')
|
||||
_, quiet, _ = self.assertRunNotOK('-q', self.pkgdir)
|
||||
_, silent, _ = self.assertRunNotOK('-qq', self.pkgdir)
|
||||
self.assertNotEqual(b'', quiet)
|
||||
self.assertEqual(b'', silent)
|
||||
|
||||
def test_regexp(self):
|
||||
self.assertRunOK('-q', '-x', r'ba[^\\/]*$', self.pkgdir)
|
||||
self.assertNotCompiled(self.barfn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue