Mercurial > cpython-lru_cache-weakref
diff Lib/sqlite3/test/userfunctions.py @ 41575:beacf40b5960
Rip out all the u"..." literals and calls to unicode().
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 02 May 2007 19:09:54 +0000 |
| parents | 6b18a095c2e7 |
| children | e64286053b25 |
line wrap: on
line diff
--- a/Lib/sqlite3/test/userfunctions.py Fri Apr 27 23:53:51 2007 +0000 +++ b/Lib/sqlite3/test/userfunctions.py Wed May 02 19:09:54 2007 +0000 @@ -28,7 +28,7 @@ def func_returntext(): return "foo" def func_returnunicode(): - return u"bar" + return "bar" def func_returnint(): return 42 def func_returnfloat(): @@ -41,7 +41,7 @@ 5/0 def func_isstring(v): - return type(v) is unicode + return type(v) is str def func_isint(v): return type(v) is int def func_isfloat(v): @@ -100,7 +100,7 @@ self.val = None def step(self, whichType, val): - theType = {"str": unicode, "int": int, "float": float, "None": type(None), "blob": buffer} + theType = {"str": str, "int": int, "float": float, "None": type(None), "blob": buffer} self.val = int(theType[whichType] is type(val)) def finalize(self): @@ -160,15 +160,15 @@ cur = self.con.cursor() cur.execute("select returntext()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), unicode) + self.failUnlessEqual(type(val), str) self.failUnlessEqual(val, "foo") def CheckFuncReturnUnicode(self): cur = self.con.cursor() cur.execute("select returnunicode()") val = cur.fetchone()[0] - self.failUnlessEqual(type(val), unicode) - self.failUnlessEqual(val, u"bar") + self.failUnlessEqual(type(val), str) + self.failUnlessEqual(val, "bar") def CheckFuncReturnInt(self): cur = self.con.cursor()
