mumrah/kafka-python — pull request #28 by sandello (2013-06-02 10:24:31+00:00)
Title: Refactor tests

Hi there.

I am looking towards using this library so I decided to look through and (possibly) adapt to my needs. As the first step I decided to run tests (on Mac OS X) and I have encountered some problems (Kafka was not starting, unittest module is not so convenient, etc).

So I have refactored tests a little bit. :)

Here is the list of major changes:
- Configured tests to spawn a Zookeeper instance. I am not a Java developer, so I don't have Zookeeper running locally. :)
- Extracted fixture code to the separate file, just not to mix test logic and fixture logic.
- Updated CLASSPATH settings to reflect `kafka-run-class.sh` from Kafka distribution.
- Configured tox and py.test to work with all that stuff.
- Marked unit tests as "xfail", just to silent them.
- Added `has_gzip() / has_snappy()` methods to not to fail on Snappy tests.
- Did some PEP8 styling by the way.