diff --git a/tests/dogtail/addtrans.py b/tests/dogtail/addtrans.py index 15ce0ea..34f14d7 100644 --- a/tests/dogtail/addtrans.py +++ b/tests/dogtail/addtrans.py @@ -2,9 +2,10 @@ # Dogtail test script for addtrans. import os -import pipes import tempfile +from shlex import quote + from dogtail import config from dogtail import tree from dogtail.procedural import type @@ -28,7 +29,7 @@ config.config.typingDelay = 0.025 -t = tempfile.NamedTemporaryFile() +t = tempfile.NamedTemporaryFile(mode="w+") t.write(""" 2015-10-05 * beer Assets:Cash -30 CHF @@ -37,7 +38,7 @@ t.flush() t.seek(0, 0) -run('addtrans --file %s' % pipes.quote(t.name)) +run('addtrans --file %s' % quote(t.name)) addtrans = tree.root.application('addtrans') mainwin = addtrans.window('Add transaction')