From e25b14f0ab054dbde4c2bf274f938a0f74ebb823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 8 Aug 2019 15:45:12 +0200 Subject: [PATCH 3/4] Add additional test to get 100% branch coverage the else: branch was not covered in tags._linux_platforms() due to the from the previous commit --- tests/test_tags.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_tags.py b/tests/test_tags.py index 9ec30a4..5ffbfa5 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -513,6 +513,13 @@ def test_linux_platforms_32bit_on_64bit_os(is_64bit_os, is_x86, monkeypatch): assert linux_platform == "linux_i686" +def test_linux_platforms_manylinux_unsupported(monkeypatch): + monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") + monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda *args: False) + linux_platform = tags._linux_platforms(is_32bit=False) + assert linux_platform == ["linux_x86_64"] + + def test_linux_platforms_manylinux1(monkeypatch): monkeypatch.setattr( tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux1" -- 2.22.0