Skip to content

Commit

Permalink
Avoid a test dependency on a C compiler, skip the test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hroncok committed Mar 19, 2020
1 parent 98aa09c commit eb070d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/functional/test_wheel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""'pip wheel' tests"""
import os
import re
import sys
from os.path import exists

import pytest
Expand Down Expand Up @@ -289,10 +290,17 @@ def test_pip_wheel_with_user_set_in_config(script, data, common_wheels):
assert "Successfully built withpyproject" in result.stdout, result.stdout


@pytest.mark.skipif(sys.platform.startswith('win'),
reason='The empty extension module does not work on Win')
def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels):
tmpdir = data.src / 'extension/tmp'
tmpdir.mkdir()
script.environ['TMPDIR'] = str(tmpdir)

# To avoid a test dependency on a C compiler, we set the env vars to "noop"
# The .c source is empty anyway
script.environ['CC'] = script.environ['LDSHARED'] = str('true')

result = script.pip(
'wheel', data.src / 'extension',
'--no-index', '-f', common_wheels
Expand Down

0 comments on commit eb070d2

Please sign in to comment.