diff options
Diffstat (limited to 'Lib/test/test_string.py')
-rw-r--r-- | Lib/test/test_string.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index d80c3b6..fdd431d 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -51,6 +51,17 @@ class StringTest( self.checkraises(TypeError, string_tests.BadSeq1(), 'join', ' ') self.checkequal('a b c', string_tests.BadSeq2(), 'join', ' ') + try: + def f(): + yield 4 + "" + self.fixtype(' ').join(f()) + except TypeError, e: + if '+' not in str(e): + self.fail('join() ate exception message') + else: + self.fail('exception not raised') + + class ModuleTest(unittest.TestCase): |