@@ -228,12 +228,10 @@ def test_version_detection(self, monkeypatch):
228228 platform , "mac_ver" , lambda : ("10.14" , ("" , "" , "" ), "x86_64" )
229229 )
230230 version = platform .mac_ver ()[0 ].split ("." )
231- if version [0 ] == "10" :
232- expected = "macosx_{major}_{minor}" .format (
233- major = version [0 ], minor = version [1 ]
234- )
235- else :
236- expected = "macosx_{major}_{minor}" .format (major = version [0 ], minor = 0 )
231+ major = version [0 ]
232+ minor = version [1 ] if major == "10" else "0"
233+ expected = f"macosx_{ major } _{ minor } "
234+
237235 platforms = list (tags .mac_platforms (arch = "x86_64" ))
238236 print (platforms , expected )
239237 assert platforms [0 ].startswith (expected )
@@ -608,7 +606,7 @@ def test__debug_cp38(self, debug, expected, monkeypatch):
608606 def test_pymalloc (self , pymalloc , version , result , monkeypatch ):
609607 config = {"Py_DEBUG" : 0 , "WITH_PYMALLOC" : pymalloc , "Py_UNICODE_SIZE" : 2 }
610608 monkeypatch .setattr (sysconfig , "get_config_var" , config .__getitem__ )
611- base_abi = "cp{}{}" . format ( version [0 ], version [1 ])
609+ base_abi = f "cp{ version [0 ]} { version [1 ]} "
612610 expected = [base_abi + "m" if result else base_abi ]
613611 assert tags ._cpython_abis (version ) == expected
614612
0 commit comments