|
10 | 10 | import stat
|
11 | 11 | import sys
|
12 | 12 | import time
|
13 |
| -import warnings |
14 | 13 | from io import BytesIO
|
15 | 14 |
|
16 | 15 | import pytest
|
|
24 | 23 | from pip._internal.utils.deprecation import PipDeprecationWarning, deprecated
|
25 | 24 | from pip._internal.utils.encoding import BOMS, auto_decode
|
26 | 25 | from pip._internal.utils.glibc import (
|
27 |
| - check_glibc_version, |
28 | 26 | glibc_version_string,
|
29 | 27 | glibc_version_string_confstr,
|
30 | 28 | glibc_version_string_ctypes,
|
@@ -537,38 +535,6 @@ def raises(error):
|
537 | 535 |
|
538 | 536 |
|
539 | 537 | class TestGlibc(object):
|
540 |
| - def test_manylinux_check_glibc_version(self): |
541 |
| - """ |
542 |
| - Test that the check_glibc_version function is robust against weird |
543 |
| - glibc version strings. |
544 |
| - """ |
545 |
| - for two_twenty in ["2.20", |
546 |
| - # used by "linaro glibc", see gh-3588 |
547 |
| - "2.20-2014.11", |
548 |
| - # weird possibilities that I just made up |
549 |
| - "2.20+dev", |
550 |
| - "2.20-custom", |
551 |
| - "2.20.1", |
552 |
| - ]: |
553 |
| - assert check_glibc_version(two_twenty, 2, 15) |
554 |
| - assert check_glibc_version(two_twenty, 2, 20) |
555 |
| - assert not check_glibc_version(two_twenty, 2, 21) |
556 |
| - assert not check_glibc_version(two_twenty, 3, 15) |
557 |
| - assert not check_glibc_version(two_twenty, 1, 15) |
558 |
| - |
559 |
| - # For strings that we just can't parse at all, we should warn and |
560 |
| - # return false |
561 |
| - for bad_string in ["asdf", "", "foo.bar"]: |
562 |
| - with warnings.catch_warnings(record=True) as ws: |
563 |
| - warnings.filterwarnings("always") |
564 |
| - assert not check_glibc_version(bad_string, 2, 5) |
565 |
| - for w in ws: |
566 |
| - if "Expected glibc version with" in str(w.message): |
567 |
| - break |
568 |
| - else: |
569 |
| - # Didn't find the warning we were expecting |
570 |
| - assert False |
571 |
| - |
572 | 538 | def test_glibc_version_string(self, monkeypatch):
|
573 | 539 | monkeypatch.setattr(
|
574 | 540 | os, "confstr", lambda x: "glibc 2.20", raising=False,
|
|
0 commit comments