shazow/urllib3 — comment on commit 99cd0a3c68de889af1cbcf82580d24057ab8a29d
File: dummyserver/server.py line 27
By brandon-rhodes:

The pre-chosen port number makes the test very fragile — it will fail if the port is already in use (and 8081 is in a range of very popular numbers for HTTP ports!) — and it also means that your tests will likely fail if someone uses the `nose` option to run tests in parallel, because two tests will try grabbing this same port simultaneously. So your tests, in essence, are even incompatible with each other, not just with some hypothetical process that is already using 8081. The port should be selected by the operating system by asking for special port number 0.