Skip to content

Commit

Permalink
adjust test_maps to run with coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckerns committed Sep 5, 2022
1 parent 5214e9a commit a30244b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pathos/tests/test_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ def added(*x):
assert dill.copy(s)(squared, range(4)) == dill.copy(p)(squared, range(4)).get()
del s, p

from pathos.pools import _ProcessPool as _Pool
s = Smap(Pool)
p = Map(_Pool)
r = s(p, [[squared, range(4)]]*4)
del s, p
import os
if not os.environ.get('COVERAGE'): #XXX: travis-ci
from pathos.pools import _ProcessPool as _Pool
s = Smap(Pool)
p = Map(_Pool)
r = s(p, [[squared, range(4)]]*4)
del s, p

s = Amap(Pool)
p = Imap(_Pool)
t = s(lambda x: list(p(squared, x)), [range(4)]*4)
assert r == t.get()
del s, p, r, t
s = Amap(Pool)
p = Imap(_Pool)
t = s(lambda x: list(p(squared, x)), [range(4)]*4)
assert r == t.get()
del s, p, r, t

0 comments on commit a30244b

Please sign in to comment.