Skip to content

Commit

Permalink
Create tempfile in a cross-platform way
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchinWeb committed Nov 5, 2015
1 parent c9c36d6 commit 0e59777
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_revert_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import tempfile
import unittest

from datetime import date
Expand Down Expand Up @@ -47,8 +48,8 @@ def setUp(self):

self.tmp_name = str(uuid4().hex.upper()[0:6])

archive_filename = '/tmp/' + self.tmp_name + '_archive'
todo_filename = '/tmp/' + self.tmp_name + '_todo'
archive_filename = tempfile.gettempdir() + os.sep + self.tmp_name + '_archive'
todo_filename = tempfile.gettempdir() + os.sep + self.tmp_name + '_todo'

config(p_overrides={('topydo', 'archive_filename'): archive_filename,
('topydo', 'filename'): todo_filename, ('topydo', 'backup_count'): '5'})
Expand Down

0 comments on commit 0e59777

Please sign in to comment.