Skip to content

Commit

Permalink
TST: use consistent variables names
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolodi committed Nov 11, 2022
1 parent 1b08433 commit 9532aa8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
INTERPRETER_VERSION = f'{sys.version_info[0]}{sys.version_info[1]}'

_tag = next(packaging.tags.sys_tags())
INTERPRETER_TAG = _tag.abi
PYTHON_TAG = _tag.interpreter
PLATFORM_TAG = mesonpy._adjust_manylinux_tag(_tag.platform)
ABI = _tag.abi
INTERPRETER = _tag.interpreter
PLATFORM = mesonpy._adjust_manylinux_tag(_tag.platform)

if platform.system() == 'Linux':
SHARED_LIB_EXT = 'so'
Expand Down Expand Up @@ -79,9 +79,9 @@ def test_scipy_like(wheel_scipy_like):
assert wheel_contents(artifact) == expecting

name = artifact.parsed_filename
assert name.group('pyver') == PYTHON_TAG
assert name.group('abi') == INTERPRETER_TAG
assert name.group('plat') == PLATFORM_TAG
assert name.group('pyver') == INTERPRETER
assert name.group('abi') == ABI
assert name.group('plat') == PLATFORM


@pytest.mark.skipif(platform.system() != 'Linux', reason='Needs library vendoring, only implemented in POSIX')
Expand Down Expand Up @@ -177,16 +177,16 @@ def test_executable_bit(wheel_executable_bit):

def test_detect_wheel_tag_module(wheel_purelib_and_platlib):
name = wheel.wheelfile.WheelFile(wheel_purelib_and_platlib).parsed_filename
assert name.group('pyver') == PYTHON_TAG
assert name.group('abi') == INTERPRETER_TAG
assert name.group('plat') == PLATFORM_TAG
assert name.group('pyver') == INTERPRETER
assert name.group('abi') == ABI
assert name.group('plat') == PLATFORM


def test_detect_wheel_tag_script(wheel_executable):
name = wheel.wheelfile.WheelFile(wheel_executable).parsed_filename
assert name.group('pyver') == 'py3'
assert name.group('abi') == 'none'
assert name.group('plat') == PLATFORM_TAG
assert name.group('plat') == PLATFORM


@pytest.mark.skipif(platform.system() != 'Linux', reason='Unsupported on this platform for now')
Expand Down

0 comments on commit 9532aa8

Please sign in to comment.