@@ -21,7 +21,8 @@ def test_read_from_dylib():
21
21
("test_lib_10_10_386.dylib" , "10.10.0" ),
22
22
("test_lib_10_14_386.dylib" , "10.14.0" ),
23
23
("test_lib_multiple_fat.dylib" , "10.14.0" ),
24
- ("test_lib_10_10_10.dylib" , "10.10.10" )
24
+ ("test_lib_10_10_10.dylib" , "10.10.10" ),
25
+ ("test_lib_11.dylib" , "11.0.0" ),
25
26
]
26
27
for file_name , ver in versions :
27
28
extracted = extract_macosx_min_system_version (
@@ -48,14 +49,14 @@ class TestGetPlatformMacosx:
48
49
def test_simple (self , monkeypatch ):
49
50
dirname = os .path .dirname (__file__ )
50
51
dylib_dir = os .path .join (dirname , "testdata" , "macosx_minimal_system_version" )
51
- monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("macosx-10.14 -x86_64" ))
52
- assert get_platform (dylib_dir ) == "macosx_10_14_x86_64 "
52
+ monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("macosx-11.0 -x86_64" ))
53
+ assert get_platform (dylib_dir ) == "macosx_11_0_x86_64 "
53
54
54
55
def test_version_bump (self , monkeypatch , capsys ):
55
56
dirname = os .path .dirname (__file__ )
56
57
dylib_dir = os .path .join (dirname , "testdata" , "macosx_minimal_system_version" )
57
58
monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("macosx-10.9-x86_64" ))
58
- assert get_platform (dylib_dir ) == "macosx_10_14_x86_64 "
59
+ assert get_platform (dylib_dir ) == "macosx_11_0_x86_64 "
59
60
captured = capsys .readouterr ()
60
61
assert "[WARNING] This wheel needs a higher macOS version than" in captured .err
61
62
@@ -127,6 +128,25 @@ def test_warning_on_to_low_env_variable(self, monkeypatch, capsys):
127
128
captured = capsys .readouterr ()
128
129
assert "MACOSX_DEPLOYMENT_TARGET is set to a lower value (10.8) than the" in captured .err
129
130
131
+ def test_get_platform_bigsur_env (self , monkeypatch ):
132
+ dirname = os .path .dirname (__file__ )
133
+ dylib_dir = os .path .join (dirname , "testdata" , "macosx_minimal_system_version" )
134
+ monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("macosx-10.9-x86_64" ))
135
+ monkeypatch .setenv ("MACOSX_DEPLOYMENT_TARGET" , "11" )
136
+ monkeypatch .setattr (os , "walk" , return_factory (
137
+ [(dylib_dir , [], ["test_lib_10_6.dylib" , "test_lib_10_10_fat.dylib" ])]
138
+ ))
139
+ assert get_platform (dylib_dir ) == "macosx_11_0_x86_64"
140
+
141
+ def test_get_platform_bigsur_platform (self , monkeypatch ):
142
+ dirname = os .path .dirname (__file__ )
143
+ dylib_dir = os .path .join (dirname , "testdata" , "macosx_minimal_system_version" )
144
+ monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("macosx-11-x86_64" ))
145
+ monkeypatch .setattr (os , "walk" , return_factory (
146
+ [(dylib_dir , [], ["test_lib_10_6.dylib" , "test_lib_10_10_fat.dylib" ])]
147
+ ))
148
+ assert get_platform (dylib_dir ) == "macosx_11_0_x86_64"
149
+
130
150
131
151
def test_get_platform_linux (monkeypatch ):
132
152
monkeypatch .setattr (distutils .util , "get_platform" , return_factory ("linux_x86_64" ))
0 commit comments