Skip to content

Commit 3b843cc

Browse files
committed
Make unit tests pass: replace apply() and adapt to different attribute message.
1 parent 512ab9f commit 3b843cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Lib/sqlite3/dbapi2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
Timestamp = datetime.datetime
4040

4141
def DateFromTicks(ticks):
42-
return apply(Date, time.localtime(ticks)[:3])
42+
return Date(*time.localtime(ticks)[:3])
4343

4444
def TimeFromTicks(ticks):
45-
return apply(Time, time.localtime(ticks)[3:6])
45+
return Time(*time.localtime(ticks)[3:6])
4646

4747
def TimestampFromTicks(ticks):
48-
return apply(Timestamp, time.localtime(ticks)[:6])
48+
return Timestamp(*time.localtime(ticks)[:6])
4949

5050
version_info = tuple([int(x) for x in version.split(".")])
5151
sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])

Lib/sqlite3/test/userfunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def CheckAggrNoStep(self):
280280
cur.execute("select nostep(t) from test")
281281
self.fail("should have raised an AttributeError")
282282
except AttributeError, e:
283-
self.failUnlessEqual(e.args[0], "AggrNoStep instance has no attribute 'step'")
283+
self.failUnlessEqual(e.args[0], "'AggrNoStep' object has no attribute 'step'")
284284

285285
def CheckAggrNoFinalize(self):
286286
cur = self.con.cursor()

0 commit comments

Comments
 (0)