diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-02-11 22:15:31 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-02-11 22:15:31 -0500 |
commit | ce8e3ee174ed9dee84aa08a461fb174ac1e53535 (patch) | |
tree | da78c024b4491210e61b73e9e2f755d46c8bc1ff /setuptools/tests/test_glibc.py | |
parent | 53b8523fdfa19173d2e6b11d6b4d175f54b9dfea (diff) | |
parent | a5dec2f14e3414e4ee5dd146bff9c289d573de9a (diff) | |
download | external_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.tar.gz external_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.tar.bz2 external_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.zip |
Merge branch 'master' into fix/1557
Diffstat (limited to 'setuptools/tests/test_glibc.py')
-rw-r--r-- | setuptools/tests/test_glibc.py | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/setuptools/tests/test_glibc.py b/setuptools/tests/test_glibc.py deleted file mode 100644 index 795fdc56..00000000 --- a/setuptools/tests/test_glibc.py +++ /dev/null @@ -1,52 +0,0 @@ -import warnings - -import pytest - -from setuptools.glibc import check_glibc_version - -__metaclass__ = type - - -@pytest.fixture(params=[ - "2.20", - # used by "linaro glibc", see gh-3588 - "2.20-2014.11", - # weird possibilities that I just made up - "2.20+dev", - "2.20-custom", - "2.20.1", - ]) -def two_twenty(request): - return request.param - - -@pytest.fixture(params=["asdf", "", "foo.bar"]) -def bad_string(request): - return request.param - - -class TestGlibc: - def test_manylinux1_check_glibc_version(self, two_twenty): - """ - Test that the check_glibc_version function is robust against weird - glibc version strings. - """ - assert check_glibc_version(two_twenty, 2, 15) - assert check_glibc_version(two_twenty, 2, 20) - assert not check_glibc_version(two_twenty, 2, 21) - assert not check_glibc_version(two_twenty, 3, 15) - assert not check_glibc_version(two_twenty, 1, 15) - - def test_bad_versions(self, bad_string): - """ - For unparseable strings, warn and return False - """ - with warnings.catch_warnings(record=True) as ws: - warnings.filterwarnings("always") - assert not check_glibc_version(bad_string, 2, 5) - for w in ws: - if "Expected glibc version with" in str(w.message): - break - else: - # Didn't find the warning we were expecting - assert False |