diff options
author | Raymond Hettinger <python@rcn.com> | 2011-01-05 20:24:08 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-01-05 20:24:08 (GMT) |
commit | 7d967712b8cc35b4cc33c1a7be14ddc9baba2c97 (patch) | |
tree | 36319103faf3fab533e209281a7f4fe84f739933 | |
parent | 90e8f8cd9b18fd18581a1ee01664f50852fe68f8 (diff) | |
download | cpython-7d967712b8cc35b4cc33c1a7be14ddc9baba2c97.zip cpython-7d967712b8cc35b4cc33c1a7be14ddc9baba2c97.tar.gz cpython-7d967712b8cc35b4cc33c1a7be14ddc9baba2c97.tar.bz2 |
Update tests and whatsnew for the 'quiet' flag
-rw-r--r-- | Doc/whatsnew/3.2.rst | 9 | ||||
-rw-r--r-- | Lib/test/test_sys.py | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 51ebcd2..4ba871e 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -383,7 +383,14 @@ Some smaller changes made to the core Python language are: (Suggested by Mark Dickinson and implemented by Eric Smith in :issue:`7094`.) * The interpreter can now be started with a quiet option, ``-q``, to suppress - the copyright and version information in an interactive mode. + the copyright and version information in an interactive mode. The option can + be introspected using the :attr:`sys.flags` attribute:: + + $ python -q + >>> sys.flags + sys.flags(debug=0, division_warning=0, inspect=0, interactive=0, + optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, + ignore_environment=0, verbose=0, bytes_warning=0, quiet=1) (Contributed by Marcin Wojdyr in issue:`1772833`). diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 92b7c42..50f0e93 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -501,7 +501,7 @@ class SysModuleTest(unittest.TestCase): attrs = ("debug", "division_warning", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_user_site", "no_site", "ignore_environment", "verbose", - "bytes_warning") + "bytes_warning", "quiet") for attr in attrs: self.assertTrue(hasattr(sys.flags, attr), attr) self.assertEqual(type(getattr(sys.flags, attr)), int, attr) |