avoid creation of file in os.getcwd() cc avanderneut

This commit is contained in:
holger krekel 2013-09-30 08:36:31 +02:00
parent a930f44e60
commit 8b1e53f6d3
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ def test_argcomplete(testdir, monkeypatch):
if not py.path.local.sysfind('bash'): if not py.path.local.sysfind('bash'):
pytest.skip("bash not available") pytest.skip("bash not available")
import os import os
script = os.path.join(os.getcwd(), 'test_argcomplete') script = str(testdir.tmpdir.join("test_argcomplete"))
with open(str(script), 'w') as fp: with open(str(script), 'w') as fp:
# redirect output from argcomplete to stdin and stderr is not trivial # redirect output from argcomplete to stdin and stderr is not trivial
# http://stackoverflow.com/q/12589419/1307905 # http://stackoverflow.com/q/12589419/1307905