annotate Lib/test/test_future4.py @ 58765:2ba7677bfa95 legacy-trunk

testCopysign was defined twice in test_math; combine the definitions
author Mark Dickinson <dickinsm@gmail.com>
date Sat, 06 Feb 2010 23:11:25 +0000
parents 6768b2350c57
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
1 from __future__ import unicode_literals
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
2
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
3 import unittest
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
4 from test import test_support
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
5
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
6 class TestFuture(unittest.TestCase):
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
7 def assertType(self, obj, typ):
55002
6768b2350c57 convert usage of fail* to assert*
Benjamin Peterson <benjamin@python.org>
parents: 46137
diff changeset
8 self.assertTrue(type(obj) is typ,
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
9 "type(%r) is %r, not %r" % (obj, type(obj), typ))
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
10
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
11 def test_unicode_strings(self):
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
12 self.assertType("", unicode)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
13 self.assertType('', unicode)
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
14 self.assertType(r"", unicode)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
15 self.assertType(r'', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
16 self.assertType(""" """, unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
17 self.assertType(''' ''', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
18 self.assertType(r""" """, unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
19 self.assertType(r''' ''', unicode)
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
20 self.assertType(u"", unicode)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
21 self.assertType(u'', unicode)
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
22 self.assertType(ur"", unicode)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
23 self.assertType(ur'', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
24 self.assertType(u""" """, unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
25 self.assertType(u''' ''', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
26 self.assertType(ur""" """, unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
27 self.assertType(ur''' ''', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
28
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
29 self.assertType(b"", str)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
30 self.assertType(b'', str)
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
31 self.assertType(br"", str)
46137
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
32 self.assertType(br'', str)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
33 self.assertType(b""" """, str)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
34 self.assertType(b''' ''', str)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
35 self.assertType(br""" """, str)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
36 self.assertType(br''' ''', str)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
37
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
38 self.assertType('' '', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
39 self.assertType('' u'', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
40 self.assertType(u'' '', unicode)
62138a0f4232 Added test cases for single quoted strings, both forms of triple quotes,
Eric Smith <eric@trueblade.com>
parents: 46122
diff changeset
41 self.assertType(u'' u'', unicode)
46122
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
42
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
43 def test_main():
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
44 test_support.run_unittest(TestFuture)
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
45
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
46 if __name__ == "__main__":
a935c50cb51a I forgot to svn add the future test
Christian Heimes <christian@cheimes.de>
parents:
diff changeset
47 test_main()