summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Holth <dholth@fastmail.fm>2014-03-31 21:46:46 -0400
committerDaniel Holth <dholth@fastmail.fm>2014-03-31 21:46:46 -0400
commit661cbcac1ec50595883f82dbc9f34b053d884c30 (patch)
tree9c20d797e755a512ecb642b0d5b189c1888b77a4
parent5adb66a2fb2a4f7b254817158d861fbaa16b4420 (diff)
downloadwheel-661cbcac1ec50595883f82dbc9f34b053d884c30.tar.gz
fix tests for Python 2
-rw-r--r--wheel/test/test_tagopt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/wheel/test/test_tagopt.py b/wheel/test/test_tagopt.py
index e013092..300fcf9 100644
--- a/wheel/test/test_tagopt.py
+++ b/wheel/test/test_tagopt.py
@@ -2,8 +2,8 @@
Tests for the bdist_wheel tag options (--python-tag and --universal)
"""
-import os
import sys
+import shutil
import pytest
import py.path
import tempfile
@@ -22,11 +22,11 @@ setup(
@pytest.fixture
def temp_pkg(request):
- tempdir = tempfile.TemporaryDirectory()
+ tempdir = tempfile.mkdtemp()
def fin():
- tempdir.cleanup()
+ shutil.rmtree(tempdir)
request.addfinalizer(fin)
- temppath = py.path.local(tempdir.name)
+ temppath = py.path.local(tempdir)
temppath.join('test.py').write('print("Hello, world")')
temppath.join('setup.py').write(SETUP_PY)
return temppath