diff options
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 599f09b..d297870 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -5,6 +5,11 @@ import struct import subprocess import textwrap +# count the number of test runs, used to create unique +# strings to intern in test_intern() +numruns = 0 + + class SysModuleTest(unittest.TestCase): def setUp(self): @@ -383,8 +388,10 @@ class SysModuleTest(unittest.TestCase): self.assertEqual(sys.__stdout__.encoding, sys.__stderr__.encoding) def test_intern(self): + global numruns + numruns += 1 self.assertRaises(TypeError, sys.intern) - s = "never interned before" + s = "never interned before" + str(numruns) self.assertTrue(sys.intern(s) is s) s2 = s.swapcase().swapcase() self.assertTrue(sys.intern(s2) is s) |