Skip to content

Commit

Permalink
add a test to improve coverage on non-windows, fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Dec 10, 2022
1 parent 6a37a6e commit 1fbadfe
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,10 +884,16 @@ def test__generic_abi_old_windows(self, monkeypatch):
monkeypatch.setattr(sysconfig, "get_config_var", config.__getitem__)
assert tags._generic_abi() == tags._cpython_abis(sys.version_info[:2])

def test__generic_abi_windows(self, monkeypatch):
config = {
"EXT_SUFFIX": ".cp310-win_amd64.pyd",
}
monkeypatch.setattr(sysconfig, "get_config_var", config.__getitem__)
assert tags._generic_abi() == ["cp310"]

@pytest.mark.skipif(sys.implementation.name != "cpython", reason="CPython-only")
def test__generic_abi_windows(self):
"""Test that the two methods of finding the abi tag agree
"""
def test__generic_abi_agree(self):
"""Test that the two methods of finding the abi tag agree"""
assert tags._generic_abi() == tags._cpython_abis(sys.version_info[:2])

def test_generic_platforms(self):
Expand Down

0 comments on commit 1fbadfe

Please sign in to comment.