@@ -440,12 +440,14 @@ def test_linux_platforms_32_64bit_on_64bit_os(
440
440
self , arch , is_32bit , expected , monkeypatch
441
441
):
442
442
monkeypatch .setattr (distutils .util , "get_platform" , lambda : arch )
443
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
443
444
monkeypatch .setattr (tags , "_is_manylinux_compatible" , lambda * args : False )
444
445
linux_platform = list (tags ._linux_platforms (is_32bit = is_32bit ))[- 1 ]
445
446
assert linux_platform == expected
446
447
447
448
def test_linux_platforms_manylinux_unsupported (self , monkeypatch ):
448
449
monkeypatch .setattr (distutils .util , "get_platform" , lambda : "linux_x86_64" )
450
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
449
451
monkeypatch .setattr (tags , "_is_manylinux_compatible" , lambda * args : False )
450
452
linux_platform = list (tags ._linux_platforms (is_32bit = False ))
451
453
assert linux_platform == ["linux_x86_64" ]
@@ -457,6 +459,7 @@ def test_linux_platforms_manylinux1(self, is_x86, monkeypatch):
457
459
if platform .system () != "Linux" or not is_x86 :
458
460
monkeypatch .setattr (distutils .util , "get_platform" , lambda : "linux_x86_64" )
459
461
monkeypatch .setattr (platform , "machine" , lambda : "x86_64" )
462
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
460
463
platforms = list (tags ._linux_platforms (is_32bit = False ))
461
464
arch = platform .machine ()
462
465
assert platforms == ["manylinux1_" + arch , "linux_" + arch ]
@@ -468,6 +471,7 @@ def test_linux_platforms_manylinux2010(self, is_x86, monkeypatch):
468
471
if platform .system () != "Linux" or not is_x86 :
469
472
monkeypatch .setattr (distutils .util , "get_platform" , lambda : "linux_x86_64" )
470
473
monkeypatch .setattr (platform , "machine" , lambda : "x86_64" )
474
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
471
475
platforms = list (tags ._linux_platforms (is_32bit = False ))
472
476
arch = platform .machine ()
473
477
expected = [
@@ -491,6 +495,7 @@ def test_linux_platforms_manylinux2014(self, is_x86, monkeypatch):
491
495
if platform .system () != "Linux" or not is_x86 :
492
496
monkeypatch .setattr (distutils .util , "get_platform" , lambda : "linux_x86_64" )
493
497
monkeypatch .setattr (platform , "machine" , lambda : "x86_64" )
498
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
494
499
platforms = list (tags ._linux_platforms (is_32bit = False ))
495
500
arch = platform .machine ()
496
501
expected = [
@@ -566,6 +571,7 @@ def test_linux_platforms_manylinux2014_armv6l(self, monkeypatch):
566
571
tags , "_is_manylinux_compatible" , lambda name , _ : name == "manylinux2014"
567
572
)
568
573
monkeypatch .setattr (distutils .util , "get_platform" , lambda : "linux_armv6l" )
574
+ monkeypatch .setattr (os , "confstr" , lambda x : "glibc 2.20" , raising = False )
569
575
platforms = list (tags ._linux_platforms (is_32bit = True ))
570
576
expected = ["linux_armv6l" ]
571
577
assert platforms == expected
0 commit comments