ffalcinelli/pydivert — pull request #6 by mhils (2014-10-06 17:46:56+00:00)
Title: do not always import tests in setup.py

Hi Fabio,

thanks for your great work here. We're using pydivert for mitmproxy's upcoming transparent mode on Windows and it works like a charm. However, the installation fails on a fresh Windows machine as setup.py imports pydivert.tests, which again tries to import mock, but mock isn't installed.
```
C:\Users\user\Downloads\pydivert-master>python setup.py install
Traceback (most recent call last):
File "setup.py", line 22, in
from pydivert.tests import run_test_suites
File "C:\Users\user\Downloads\pydivert-master\pydivert\tests\__init__.py", line 25, in
from mock import patch, MagicMock
ImportError: No module named mock
```

This PR moves the import call into `RunTests.run`.

You may also want to add a [extras_require](https://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies) to your setup.py, although anyone who runs tests will figure out how to install mock anyway.

Thanks for you work on pydivert!
Max