summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/test/factory.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
commitef87d6ed94780fe00250a551031023aeb2898365 (patch)
tree1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/sqlite3/test/factory.py
parent572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff)
downloadcpython-ef87d6ed94780fe00250a551031023aeb2898365.zip
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/sqlite3/test/factory.py')
-rw-r--r--Lib/sqlite3/test/factory.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/sqlite3/test/factory.py b/Lib/sqlite3/test/factory.py
index 8a77d5d..61edc6c 100644
--- a/Lib/sqlite3/test/factory.py
+++ b/Lib/sqlite3/test/factory.py
@@ -139,31 +139,31 @@ class TextFactoryTests(unittest.TestCase):
self.con = sqlite.connect(":memory:")
def CheckUnicode(self):
- austria = unicode("Österreich", "latin1")
+ austria = str("Österreich", "latin1")
row = self.con.execute("select ?", (austria,)).fetchone()
- self.failUnless(type(row[0]) == unicode, "type of row[0] must be unicode")
+ self.failUnless(type(row[0]) == str, "type of row[0] must be unicode")
def CheckString(self):
self.con.text_factory = str
- austria = unicode("Österreich", "latin1")
+ austria = str("Österreich", "latin1")
row = self.con.execute("select ?", (austria,)).fetchone()
self.failUnless(type(row[0]) == str, "type of row[0] must be str")
self.failUnless(row[0] == austria.encode("utf-8"), "column must equal original data in UTF-8")
def CheckCustom(self):
- self.con.text_factory = lambda x: unicode(x, "utf-8", "ignore")
- austria = unicode("Österreich", "latin1")
+ self.con.text_factory = lambda x: str(x, "utf-8", "ignore")
+ austria = str("Österreich", "latin1")
row = self.con.execute("select ?", (austria.encode("latin1"),)).fetchone()
- self.failUnless(type(row[0]) == unicode, "type of row[0] must be unicode")
- self.failUnless(row[0].endswith(u"reich"), "column must contain original data")
+ self.failUnless(type(row[0]) == str, "type of row[0] must be unicode")
+ self.failUnless(row[0].endswith("reich"), "column must contain original data")
def CheckOptimizedUnicode(self):
self.con.text_factory = sqlite.OptimizedUnicode
- austria = unicode("Österreich", "latin1")
- germany = unicode("Deutchland")
+ austria = str("Österreich", "latin1")
+ germany = str("Deutchland")
a_row = self.con.execute("select ?", (austria,)).fetchone()
d_row = self.con.execute("select ?", (germany,)).fetchone()
- self.failUnless(type(a_row[0]) == unicode, "type of non-ASCII row must be unicode")
+ self.failUnless(type(a_row[0]) == str, "type of non-ASCII row must be unicode")
self.failUnless(type(d_row[0]) == str, "type of ASCII-only row must be str")
def tearDown(self):