Message187621
+1 for Ezio's suggestion regarding tests that need the mock module. To simplify backporting you may want to do something like the following in a helper module:
try:
import unittest.mock as mock
except ImportError:
try:
import mock
except ImportError:
mock = None
Then the individual test files would retrieve the mock attribute from the helper module and check it with the skip decorators in the tests that needed mocks. |
|
Date |
User |
Action |
Args |
2013-04-23 09:01:28 | ncoghlan | set | recipients:
+ ncoghlan, terry.reedy, ned.deily, ezio.melotti, roger.serwy, r.david.murray, Todd.Rovito, tshepang, francismb, JayKrish, Tomoki.Imai |
2013-04-23 09:01:28 | ncoghlan | set | messageid: <1366707688.27.0.153055634769.issue15392@psf.upfronthosting.co.za> |
2013-04-23 09:01:28 | ncoghlan | link | issue15392 messages |
2013-04-23 09:01:28 | ncoghlan | create | |
|