def test_have_compatible_glibc(monkeypatch): if platform.system() == "Linux": # Assuming no one is running this test with a version of glibc released in # 1997. assert tags._have_compatible_glibc(2, 0) else: monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.4") assert tags._have_compatible_glibc(2, 4) monkeypatch.setattr(tags, "_glibc_version_string", lambda: None) assert not tags._have_compatible_glibc(2, 4)
def test_have_compatible_glibc(monkeypatch): if platform.system() == "Linux": # Assuming no one is running this test with a version of glibc released in # 1997. assert tags._have_compatible_glibc(2, 0) else: monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.4") assert tags._have_compatible_glibc(2, 4) monkeypatch.setattr(tags, "_glibc_version_string", lambda: None) assert not tags._have_compatible_glibc(2, 4)
def test_glibc_version_string_none(self, monkeypatch): monkeypatch.setattr(tags, "_glibc_version_string", lambda: None) assert not tags._have_compatible_glibc(2, 4)
def test_have_compatible_glibc(self, monkeypatch): monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.4") assert tags._have_compatible_glibc(2, 4)
def test_have_compatible_glibc_linux(self): # Assuming no one is running this test with a version of glibc released in # 1997. assert tags._have_compatible_glibc(2, 0)