When packaging pytest in Linux distributions (and I guess it matters for other packaging systems as well, e.g., MacPorts or Homebrew), especially for packages which are deep in the tree of dependencies, it is useful to remove all unnecessary dependencies. That's a case of mock, which is since Python 3.3 available in the standard library as unittest.mock.
This patch makes the mock only optional dependency of pytest.
When packaging
pytestin Linux distributions (and I guess it matters for other packaging systems as well, e.g., MacPorts or Homebrew), especially for packages which are deep in the tree of dependencies, it is useful to remove all unnecessary dependencies. That's a case ofmock, which is since Python 3.3 available in the standard library asunittest.mock.This patch makes the
mockonly optional dependency ofpytest.