Permalink
Browse files

Simplify setup.py

* Drop ez_setup, it is very unlikely someone still uses it
* Only install `mock` to run tests on Python 2.7
* Don't override unittest discovery command
  • Loading branch information...
NicolasLM committed Nov 14, 2017
1 parent 83e2c3d commit 8d814e562045a4751783004436f3dd22ff490dd5
Showing with 47 additions and 478 deletions.
  1. +1 −21 doc/src/contributing.rst
  2. +0 −391 ez_setup.py
  3. +39 −64 setup.py
  4. +1 −1 tests/test_enable.py
  5. +5 −0 tests/test_imapclient.py
  6. +1 −1 tests/test_response_parser.py
View
@@ -40,33 +40,13 @@ as a Git tag (e.g. "0.9.1").
Unit Tests
----------
There are comprehensive unit tests for the server response parser and
a number of other parts of the code. These tests use the unittest2
package which is also included as the standard unittest package in
Python 2.7 and 3.2 onwards.
Running Unit Tests
~~~~~~~~~~~~~~~~~~
To run the tests run::
To run the tests, from the root of the package source run::
python setup.py test
from the root of the package source. This will install the Mock
package (locally) if it isn't already installed as it is required for
many of the tests.
Where unittest2 is included in the standard library (eg. Python 2.7
and 3.2+) you can also run all unit tests like this (from the root
directory of the IMAPClient source)::
python -m unittest discover
Alternatively, if unittest2 is installed separately use the unit2
script (for Unix-like systems) or the unit2.py script::
unit2 discover
unit2.py discover
Testing Against Multiple Python Versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When submitting a Pull Request to IMAPClient, tests are automatically ran
Oops, something went wrong.

0 comments on commit 8d814e5

Please sign in to comment.