예제 #1
0
파일: test_tags.py 프로젝트: yndj/packaging
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)
예제 #2
0
파일: test_tags.py 프로젝트: pypa/packaging
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)
예제 #3
0
 def test_glibc_version_string_none(self, monkeypatch):
     monkeypatch.setattr(tags, "_glibc_version_string", lambda: None)
     assert not tags._have_compatible_glibc(2, 4)
예제 #4
0
 def test_have_compatible_glibc(self, monkeypatch):
     monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.4")
     assert tags._have_compatible_glibc(2, 4)
예제 #5
0
 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)