shazow/urllib3 — Issue #30: Roll tests into the urllib3 package
Author: brandon-rhodes
Created: 2012-01-18 17:49:48+00:00
State: open

If someone today installs `urllib3` with `pip` or `easy_install` into a novel environment — like the 64-bit version of an operating system that none of us have tested the library against — and receives an exception, then there is no easy way for them to quickly run the test suite to see whether the problem is that their code is faulty, or that `urllib3` itself fails its own tests in the new environment.

But if we move the `test` directory, that currently sits anonymously at the top of the repository, down into the `urllib3` directory and start shipping it as a sub-package, then users who want to double-check that `urllib3` is working would simply be able to type:

```python -m unittest discover urllib3```

Or, if they were using Python <2.7, then they could install `unittest2` and use its `unit2` command line that Michael Foord developed so that older Pythons can also enjoy the new, standard way for tests to be auto-discoverable.

It is not clear to me whether the `dummyserver` top-level package that also sits in `setup.py` stands in the way of subordinating the tests beneath the package itself. (Would the dummy server need to move down inside `urllib3/tests`?)