From 61d7aefff131a1f288e3a552ffc8cfd75ee6c2e0 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 16 Jan 2019 08:20:40 -0500 Subject: [PATCH] [RM-37939] tests: consume the tmpdir fixture directly Signed-off-by: Alfredo Deza --- ceph_deploy/tests/conftest.py | 4 +--- ceph_deploy/tests/test_cli_new.py | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ceph_deploy/tests/conftest.py b/ceph_deploy/tests/conftest.py index 3b673d1..ee7fcf1 100644 --- a/ceph_deploy/tests/conftest.py +++ b/ceph_deploy/tests/conftest.py @@ -87,7 +87,7 @@ class CLITester(object): @pytest.fixture -def cli(request): +def cli(request, tmpdir): """ Test command line behavior. """ @@ -95,6 +95,4 @@ def cli(request): # the tmpdir here will be the same value as the test function # sees; we rely on that to let caller prepare and introspect # any files the cli tool will read or create - tmpdir = request.getfuncargvalue('tmpdir') - return CLITester(tmpdir=tmpdir) diff --git a/ceph_deploy/tests/test_cli_new.py b/ceph_deploy/tests/test_cli_new.py index 2ba221e..056bc78 100644 --- a/ceph_deploy/tests/test_cli_new.py +++ b/ceph_deploy/tests/test_cli_new.py @@ -24,8 +24,7 @@ def test_write_global_conf_section(tmpdir): @pytest.fixture -def newcfg(request): - tmpdir = request.getfuncargvalue('tmpdir') +def newcfg(request, tmpdir): fake_ip_addresses = lambda x: ['10.0.0.1'] def new(*args): -- 2.47.3