Message187621
| Author | ncoghlan |
|---|---|
| Recipients | JayKrish, Todd.Rovito, Tomoki.Imai, ezio.melotti, francismb, ncoghlan, ned.deily, r.david.murray, roger.serwy, terry.reedy, tshepang |
| Date | 2013-04-23.09:01:28 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1366707688.27.0.153055634769.issue15392@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
+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. |
|
| History | |||
|---|---|---|---|
| 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 | |