]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added test cases for single quoted strings, both forms of triple quotes,
authorEric Smith <eric@trueblade.com>
Thu, 27 Mar 2008 09:42:35 +0000 (09:42 +0000)
committerEric Smith <eric@trueblade.com>
Thu, 27 Mar 2008 09:42:35 +0000 (09:42 +0000)
 and some string concatenations.
Removed unneeded __future__ print_function import.

Lib/test/test_future4.py

index 89458b5008e08128dad6f3b60b317fdeb7c62701..2580c55fe73fb3441e0033195a1ca47795345976 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import print_function
 from __future__ import unicode_literals
 
 import unittest
@@ -11,11 +10,35 @@ class TestFuture(unittest.TestCase):
 
     def test_unicode_strings(self):
         self.assertType("", unicode)
+        self.assertType('', unicode)
         self.assertType(r"", unicode)
+        self.assertType(r'', unicode)
+        self.assertType(""" """, unicode)
+        self.assertType(''' ''', unicode)
+        self.assertType(r""" """, unicode)
+        self.assertType(r''' ''', unicode)
         self.assertType(u"", unicode)
+        self.assertType(u'', unicode)
         self.assertType(ur"", unicode)
+        self.assertType(ur'', unicode)
+        self.assertType(u""" """, unicode)
+        self.assertType(u''' ''', unicode)
+        self.assertType(ur""" """, unicode)
+        self.assertType(ur''' ''', unicode)
+
         self.assertType(b"", str)
+        self.assertType(b'', str)
         self.assertType(br"", str)
+        self.assertType(br'', str)
+        self.assertType(b""" """, str)
+        self.assertType(b''' ''', str)
+        self.assertType(br""" """, str)
+        self.assertType(br''' ''', str)
+
+        self.assertType('' '', unicode)
+        self.assertType('' u'', unicode)
+        self.assertType(u'' '', unicode)
+        self.assertType(u'' u'', unicode)
 
 def test_main():
     test_support.run_unittest(TestFuture)