summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 0a62c01..264544d 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -279,8 +279,8 @@ class SysModuleTest(unittest.TestCase):
self.assert_(isinstance(sys.copyright, str))
self.assert_(isinstance(sys.exec_prefix, str))
self.assert_(isinstance(sys.executable, str))
- self.assert_(isinstance(sys.float_info, dict))
self.assertEqual(len(sys.float_info), 11)
+ self.assertEqual(sys.float_info.radix, 2)
self.assert_(isinstance(sys.hexversion, int))
self.assert_(isinstance(sys.maxsize, int))
self.assert_(isinstance(sys.maxunicode, int))
@@ -320,6 +320,17 @@ class SysModuleTest(unittest.TestCase):
self.assertRaises(TypeError, sys.intern, S("abc"))
+ def test_sys_flags(self):
+ self.failUnless(sys.flags)
+ attrs = ("debug", "division_warning",
+ "inspect", "interactive", "optimize", "dont_write_bytecode",
+ "no_site", "ingnore_environment", "tabcheck", "verbose")
+ for attr in attrs:
+ self.assert_(hasattr(sys.flags, attr), attr)
+ self.assertEqual(type(getattr(sys.flags, attr)), int, attr)
+ self.assert_(repr(sys.flags))
+
+
def test_main():
test.test_support.run_unittest(SysModuleTest)