From: Alfredo Deza Date: Wed, 16 Jan 2019 13:20:40 +0000 (-0500) Subject: [RM-37939] tests: consume the tmpdir fixture directly X-Git-Tag: v2.1.0~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2FRM-37939;p=ceph-deploy.git [RM-37939] tests: consume the tmpdir fixture directly Signed-off-by: Alfredo Deza --- 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):