]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future4.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / test_future4.py
CommitLineData
4710c53d 1from __future__ import unicode_literals\r
2\r
3import unittest\r
4from test import test_support\r
5\r
6class TestFuture(unittest.TestCase):\r
7 def assertType(self, obj, typ):\r
8 self.assertTrue(type(obj) is typ,\r
9 "type(%r) is %r, not %r" % (obj, type(obj), typ))\r
10\r
11 def test_unicode_strings(self):\r
12 self.assertType("", unicode)\r
13 self.assertType('', unicode)\r
14 self.assertType(r"", unicode)\r
15 self.assertType(r'', unicode)\r
16 self.assertType(""" """, unicode)\r
17 self.assertType(''' ''', unicode)\r
18 self.assertType(r""" """, unicode)\r
19 self.assertType(r''' ''', unicode)\r
20 self.assertType(u"", unicode)\r
21 self.assertType(u'', unicode)\r
22 self.assertType(ur"", unicode)\r
23 self.assertType(ur'', unicode)\r
24 self.assertType(u""" """, unicode)\r
25 self.assertType(u''' ''', unicode)\r
26 self.assertType(ur""" """, unicode)\r
27 self.assertType(ur''' ''', unicode)\r
28\r
29 self.assertType(b"", str)\r
30 self.assertType(b'', str)\r
31 self.assertType(br"", str)\r
32 self.assertType(br'', str)\r
33 self.assertType(b""" """, str)\r
34 self.assertType(b''' ''', str)\r
35 self.assertType(br""" """, str)\r
36 self.assertType(br''' ''', str)\r
37\r
38 self.assertType('' '', unicode)\r
39 self.assertType('' u'', unicode)\r
40 self.assertType(u'' '', unicode)\r
41 self.assertType(u'' u'', unicode)\r
42\r
43def test_main():\r
44 test_support.run_unittest(TestFuture)\r
45\r
46if __name__ == "__main__":\r
47 test_main()\r