Nick Coghlan added the comment: +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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15392> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com