Christian Heimes | fa50bad | 2008-03-26 22:55:31 +0000 | [diff] [blame] | 1 | from __future__ import print_function |
| 2 | from __future__ import unicode_literals |
| 3 | |
| 4 | import unittest |
| 5 | from test import test_support |
| 6 | |
| 7 | class TestFuture(unittest.TestCase): |
| 8 | def assertType(self, obj, typ): |
| 9 | self.assert_(type(obj) is typ, |
| 10 | "type(%r) is %r, not %r" % (obj, type(obj), typ)) |
| 11 | |
| 12 | def test_unicode_strings(self): |
| 13 | self.assertType("", unicode) |
| 14 | self.assertType(r"", unicode) |
| 15 | self.assertType(u"", unicode) |
| 16 | self.assertType(ur"", unicode) |
| 17 | self.assertType(b"", str) |
| 18 | self.assertType(br"", str) |
| 19 | |
| 20 | def test_main(): |
| 21 | test_support.run_unittest(TestFuture) |
| 22 | |
| 23 | if __name__ == "__main__": |
| 24 | test_main() |