diff --git a/src/packaging/_manylinux.py b/src/packaging/_manylinux.py index 3705d50d..95f84281 100644 --- a/src/packaging/_manylinux.py +++ b/src/packaging/_manylinux.py @@ -82,7 +82,7 @@ def _glibc_version_string_confstr() -> Optional[str]: # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 try: # Should be a string like "glibc 2.17". - version_string: str = getattr(os, "confstr")("CS_GNU_LIBC_VERSION") + version_string: Optional[str] = os.confstr("CS_GNU_LIBC_VERSION") assert version_string is not None _, version = version_string.rsplit() except (AssertionError, AttributeError, OSError, ValueError): diff --git a/tests/test_structures.py b/tests/test_structures.py index f8115e57..cc651cf6 100644 --- a/tests/test_structures.py +++ b/tests/test_structures.py @@ -8,11 +8,11 @@ def test_infinity_repr(): - repr(Infinity) == "Infinity" + assert repr(Infinity) == "Infinity" def test_negative_infinity_repr(): - repr(NegativeInfinity) == "-Infinity" + assert repr(NegativeInfinity) == "-Infinity" def test_infinity_hash():