summaryrefslogtreecommitdiff
path: root/test/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove SimpleClient, Producer, Consumer, Unittest (#1196)Jeff Widman2019-10-111-9/+0
| | | | | | | | | | | | | | | | | | In the 2.0 release, we're removing: * `SimpleClient` * `SimpleConsumer` * `SimpleProducer` * Old partitioners used by `SimpleProducer`; these are superceded by the `DefaultPartitioner` These have been deprecated for several years in favor of `KafkaClient` / `KafkaConsumer` / `KafkaProducer`. Since 2.0 allows breaking changes, we are removing the deprecated classes. Additionally, since the only usage of `unittest` was in tests for these old Simple* clients, this also drops `unittest` from the library. All tests now run under `pytest`.
* convert test_admin_integration to pytest (#1923)Ulrik Johansson2019-10-071-0/+19
|
* Convert remaining `KafkaConsumer` tests to `pytest` (#1886)Jeff Widman2019-08-221-0/+26
| | | | | | | | This makes it so the only remaining use of `unittest` is in the old tests of the deprecated `Simple*` clients. All `KafkaConsumer` tests are migrated to `pytest`. I also had to bump the test iterations up on one of the tests, I think there was a race condition there that was more commonly hit under pytest , planning to cleanup that in a followup PR. See https://github.com/dpkp/kafka-python/pull/1886#discussion_r316860737 for details.
* Cleanup handling of KAFKA_VERSION env var in tests (#1887)Jeff Widman2019-08-221-10/+4
| | | | | | | | | | | | | Now that we are using `pytest`, there is no need for a custom decorator because we can use `pytest.mark.skipif()`. This makes the code significantly simpler. In particular, dropping the custom `@kafka_versions()` decorator is necessary because it uses `func.wraps()` which doesn't play nice with `pytest` fixtures: - https://github.com/pytest-dev/pytest/issues/677 - https://stackoverflow.com/a/19614807/770425 So this is a pre-requisite to migrating some of those tests to using pytest fixtures.
* Minor test cleanup (#1885)Jeff Widman2019-08-211-0/+11
| | | | Remove unused import, whitespace, etc. No functional changes, just cleaning it up so the diffs of later changes are cleaner.
* Migrate from `Unittest` to `pytest` (#1620)Jeff Widman2018-11-101-2/+0
|
* Cleanup fixture importsJeff Widman2018-10-271-2/+2
| | | | | | | | | | | | | | | `random_string` now comes from `test.fixtures` and was being transparently imported via `test.testutil` so this bypasses the pointless indirect import. Similarly, `kafka_version` was transparently imported by `test.testutil` from `test.fixtures`. Also removed `random_port()` in `test.testutil` because its unused as its been replaced by the one in `test.fixtures`. This is part of the pytest migration that was started back in a1869c4be5f47b4f6433610249aaf29af4ec95e5.
* Add codec validators to record parser and builder for all formats (#1447)Taras2018-04-181-1/+1
|
* Add BrokerConnection.connect_blocking() (#1411)Dana Powers2018-03-091-0/+1
|
* Introduce new fixtures to prepare for migration to pytest.Andre Araujo2018-02-211-17/+96
| | | | | | | This commits adds new pytest fixtures in prepation for the migration of unittest.TestCases to pytest test cases. The handling of temporary dir creation was also changed so that we can use the pytest tmpdir fixture after the migration.
* Update pytest fixtures to new yield syntax (#919)Jeff Widman2017-01-111-8/+4
|
* Always absolute_importabsolute_importDana Powers2016-08-021-0/+2
|
* Update conn fixture to check for HANDSHAKE stateDana Powers2016-04-091-1/+2
|
* Add BrokerConnection.disconnected() method; update testsDana Powers2016-04-081-2/+7
|
* Consolidate conn fixture definitionsDana Powers2016-04-071-0/+19
|
* Move pytest broker/zk fixtures to test.conftestDana Powers2016-01-241-0/+33