summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-30 10:40:24 (GMT)
committerGitHub <noreply@github.com>2017-11-30 10:40:24 (GMT)
commit5e3806f8cfd84722fc55d4299dc018ad9b0f8401 (patch)
tree436f0a963001f590a1193dba5c84627ba59513c2 /Lib/test/test_sys.py
parent706e10b186992e086e661a62d2c8ec9588525b31 (diff)
downloadcpython-5e3806f8cfd84722fc55d4299dc018ad9b0f8401.zip
cpython-5e3806f8cfd84722fc55d4299dc018ad9b0f8401.tar.gz
cpython-5e3806f8cfd84722fc55d4299dc018ad9b0f8401.tar.bz2
bpo-32101: Add PYTHONDEVMODE environment variable (#4624)
* bpo-32101: Add sys.flags.dev_mode flag Rename also the "Developer mode" to the "Development mode". * bpo-32101: Add PYTHONDEVMODE environment variable Mention it in the development chapiter.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 4b8fcb9..6346094 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -526,10 +526,12 @@ class SysModuleTest(unittest.TestCase):
attrs = ("debug",
"inspect", "interactive", "optimize", "dont_write_bytecode",
"no_user_site", "no_site", "ignore_environment", "verbose",
- "bytes_warning", "quiet", "hash_randomization", "isolated")
+ "bytes_warning", "quiet", "hash_randomization", "isolated",
+ "dev_mode")
for attr in attrs:
self.assertTrue(hasattr(sys.flags, attr), attr)
- self.assertEqual(type(getattr(sys.flags, attr)), int, attr)
+ attr_type = bool if attr == "dev_mode" else int
+ self.assertEqual(type(getattr(sys.flags, attr)), attr_type, attr)
self.assertTrue(repr(sys.flags))
self.assertEqual(len(sys.flags), len(attrs))