aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorJohn Ehresman <jpe@wingware.com>2012-03-30 15:13:18 -0400
committerHugo Parente Lima <hugo.lima@openbossa.org>2012-04-27 20:22:59 +0200
commit815159e28d786d83c984670cd8867d5ce3d314f4 (patch)
tree73f8b9b7e0f747f6e31cca01f7bea458721c7f2f /tests/samplebinding
parent1a6bd4513e85eec3ad1648e545cd596cb6ab3858 (diff)
Use SpooledTemporaryFile in 2.6+ os.tmpfile() fails on win32 if process doesn't have admin permissions
Change-Id: Ic231d5faac08360a793ce33c091eef251d7b35e4 Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/enum_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/samplebinding/enum_test.py b/tests/samplebinding/enum_test.py
index 6199a9b78..c577aaed7 100644
--- a/tests/samplebinding/enum_test.py
+++ b/tests/samplebinding/enum_test.py
@@ -35,7 +35,7 @@ from sample import SampleNamespace, ObjectType, Event
from py3kcompat import IS_PY3K, b
def createTempFile():
- if IS_PY3K:
+ if sys.version_info >= (2, 6):
import tempfile
return tempfile.SpooledTemporaryFile(mode='rw')
else: