Skip to content
Permalink
Browse files
Create tempfile in a cross-platform way
  • Loading branch information
MinchinWeb committed Nov 5, 2015
1 parent c9c36d6 commit 0e59777
Showing 1 changed file with 3 additions and 2 deletions.
@@ -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
@@ -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'})

0 comments on commit 0e59777

Please sign in to comment.