Commit ffada4ea authored by Dionysis Zindros's avatar Dionysis Zindros
Browse files

Windows port: Avoid /tmp for temp files.

Switch from hard-coded /tmp usage to a cross-compatible solution that utilizes
Python's tempfile module.
This adds support for running the unit tests on Windows systems.
parent 9730e234
......@@ -37,6 +37,7 @@ import time
import datetime
import os
import sys
import tempfile
from import FillingCirclesBar as IncrementalBar
......@@ -1773,8 +1774,15 @@ class testPithos(unittest.TestCase):
self.assertNotEqual(sc1, sc2)
"""Upload an object to download"""
src_fname = '/tmp/localfile1_%s' %
dnl_fname = '/tmp/localfile2_%s' %
src_file = tempfile.NamedTemporaryFile(delete=False)
dnl_file = tempfile.NamedTemporaryFile(delete=False)
src_fname =
dnl_fname =
trg_fname = 'remotefile_%s' %
f_size = 59247824
self.create_large_file(f_size, src_fname)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment