8000 Use list comprehension instead of the builtin map() function · wulczer/txpostgres@f168de6 · GitHub
[go: up one dir, main page]

Skip to content

Commit f168de6

Browse files
committed
Use list comprehension instead of the builtin map() function
This makes sure we get back a list both on Python 2 and 3.
1 parent e82b944 commit f168de6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_txpostgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def test_notifyDeliveryOrder(self):
13071307
"least version 2.3.0 of psycopg2 to process NOTIFY payloads.")
13081308

13091309
dl = [defer.Deferred() for _ in range(10)]
1310-
payloads = map(str, range(10))
1310+
payloads = [str(i) for i in range(10)]
13111311
notifyD = defer.DeferredList(dl)
13121312

13131313
def observer(notify):
@@ -1511,7 +1511,7 @@ def test_notifyWithSubsequentQuery(self):
15111511
delivered only once.
15121512
"""
15131513
dl = [defer.Deferred() for _ in range(10)]
1514-
payloads = map(str, range(10))
1514+
payloads = [str(i) for i in range(10)]
15151515
notifyD = defer.DeferredList(dl)
15161516

15171517
def observer(notify):

0 commit comments

Comments
 (0)
0