Kaydet (Commit) c5e88d5f authored tarafından Georg Brandl's avatar Georg Brandl

Fix sys.flags sequence behavior and add a test case.

üst 9a5df4d3
......@@ -324,12 +324,13 @@ class SysModuleTest(unittest.TestCase):
self.failUnless(sys.flags)
attrs = ("debug", "division_warning",
"inspect", "interactive", "optimize", "dont_write_bytecode",
"no_site", "ignore_environment", "verbose",
"no_user_site", "no_site", "ignore_environment", "verbose",
"bytes_warning")
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))
self.assertEqual(len(sys.flags), len(attrs))
def test_clear_type_cache(self):
sys._clear_type_cache()
......
......@@ -1150,9 +1150,9 @@ static PyStructSequence_Desc flags_desc = {
flags__doc__, /* doc */
flags_fields, /* fields */
#ifdef RISCOS
11
12
#else
10
11
#endif
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment