facebook/facebook-python-ads-sdk — pull request #24 by mvanveen (2014-12-16 01:31:52+00:00)
Title: explode unit tests out of runTest into more granular methods

This is generally really useful for `nosetests`, `unittest.main`, etc.). The spec around ensuring most Python test runners derivative of `unittest` will automatically run your tests is:

1. make sure that the module has `test` in the name
2. make sure the `unittest.TestCase` subclasses have `Test` in them
3. add `test` to your underlying methods

This isn't totally enforced by a PEP at this point (I don't think), but has sort of consolidated in the greater community because of popular test runners such as `nosetests` and `pytest`.

This PR is really just handling the 3rd point, although I'd suggest renaming `facebook/test/unit.py` to something like `facebook/test/unit_test.py` (or perhaps something even more descriptive, as `unit.py` is pretty catch-all). The reason I'm making a PR for it is because I was bewildered when I found only 4 unit tests. Having separate pass/fail reporting for each of these individually is tremendously more useful in development over macro tests for each specific function. Otherwise, there's an extra level of indirection when you've got a failing test that the developer has to back out from the trace.

Hope you appreciate this PR! This is sort of just a starter pull for me. My employer is currently planning to make pretty heavy use of this lib, and I've found a couple more serious issues which I hope to address in subsequent PRs if this projec is open to receiving patches.