summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compileall.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-10-15 08:10:57 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-10-15 08:10:57 (GMT)
commit6554b86b1f3f007954a24b1444a26a1aa49e3d83 (patch)
tree48ff03187a81c9f633546ae705e5cdb66f172e8d /Lib/test/test_compileall.py
parent41d31967c6bcc7e730a0db77cfe1dc334c6d853e (diff)
downloadcpython-6554b86b1f3f007954a24b1444a26a1aa49e3d83.zip
cpython-6554b86b1f3f007954a24b1444a26a1aa49e3d83.tar.gz
cpython-6554b86b1f3f007954a24b1444a26a1aa49e3d83.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_compileall.py')
-rw-r--r--Lib/test/test_compileall.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
index 877d6f2..7506c70 100644
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -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)