Skip to content

Commit

Permalink
Fix a dogtail test using pipes and a wrong temporary file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudd-O committed Oct 8, 2024
1 parent 516145e commit 52f437f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/dogtail/addtrans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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')

Expand Down

0 comments on commit 52f437f

Please sign in to comment.