Commits

Daniel Holth  committed dee5857

fix tests for Python 2

  • Participants
  • Parent commits 90017e9

Comments (0)

Files changed (1)

File wheel/test/test_tagopt.py

 Tests for the bdist_wheel tag options (--python-tag and --universal)
 """
 
-import os
 import sys
+import shutil
 import pytest
 import py.path
 import tempfile
 
 @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