diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2019-12-29 12:47:31 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-12-29 12:47:31 -0500 |
commit | a5b66a8581b758aff763765857359ef540631202 (patch) | |
tree | 9404571514fbe550c98a939bd4458d97e1bf1dd2 /setuptools/tests/test_glibc.py | |
parent | d53e024af2f5d8f3a4a36588c3dc004d156bc830 (diff) | |
parent | e6bdf25f6ab5bf4d32b0f9affa0ab98ea35f3a29 (diff) | |
download | external_python_setuptools-a5b66a8581b758aff763765857359ef540631202.tar.gz external_python_setuptools-a5b66a8581b758aff763765857359ef540631202.tar.bz2 external_python_setuptools-a5b66a8581b758aff763765857359ef540631202.zip |
Merge branch 'master' into feature/include-pyproject.toml
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 |