summaryrefslogtreecommitdiff
path: root/test/test_metrics.py
diff options
context:
space:
mode:
authorJeff Widman <jeff@jeffwidman.com>2017-01-11 17:18:28 -0800
committerDana Powers <dana.powers@gmail.com>2017-01-11 17:18:28 -0800
commitcb06a6b125d798b3d60ba105f2f86bbcd1a1357a (patch)
tree72080b2beee98da7fba4e320a14e7cd7a19af65c /test/test_metrics.py
parent9a08efbdd2ee7ef5391079f548a100e578bcfab3 (diff)
downloadkafka-python-cb06a6b125d798b3d60ba105f2f86bbcd1a1357a.tar.gz
Update pytest fixtures to new yield syntax (#919)
Diffstat (limited to 'test/test_metrics.py')
-rw-r--r--test/test_metrics.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_metrics.py b/test/test_metrics.py
index e4757d6..8d35f55 100644
--- a/test/test_metrics.py
+++ b/test/test_metrics.py
@@ -32,8 +32,8 @@ def reporter():
@pytest.fixture
def metrics(request, config, reporter):
metrics = Metrics(config, [reporter], enable_expiration=True)
- request.addfinalizer(lambda: metrics.close())
- return metrics
+ yield metrics
+ metrics.close()
def test_MetricName():