From 8b1e53f6d3f697602050ae8023f4e06f4d81ef2d Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 30 Sep 2013 08:36:31 +0200 Subject: [PATCH] avoid creation of file in os.getcwd() cc avanderneut --- testing/test_parseopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index b63f9839e..99433ecc8 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -245,7 +245,7 @@ def test_argcomplete(testdir, monkeypatch): if not py.path.local.sysfind('bash'): pytest.skip("bash not available") import os - script = os.path.join(os.getcwd(), 'test_argcomplete') + script = str(testdir.tmpdir.join("test_argcomplete")) with open(str(script), 'w') as fp: # redirect output from argcomplete to stdin and stderr is not trivial # http://stackoverflow.com/q/12589419/1307905