未验证 提交 aebf2234 编写于 作者: Z Zhou Wei 提交者: GitHub

fix test_check_abi (#31288)

上级 1da32806
...@@ -61,7 +61,7 @@ class TestCheckCompiler(TestABIBase): ...@@ -61,7 +61,7 @@ class TestCheckCompiler(TestABIBase):
def test_wrong_compiler_warning(self): def test_wrong_compiler_warning(self):
# clear environ # clear environ
self.del_environ() self.del_environ()
compiler = 'nvcc' # fake wrong compiler compiler = 'python' # fake wrong compiler
with warnings.catch_warnings(record=True) as error: with warnings.catch_warnings(record=True) as error:
flag = utils.check_abi_compatibility(compiler, verbose=True) flag = utils.check_abi_compatibility(compiler, verbose=True)
# check return False # check return False
......
...@@ -930,7 +930,7 @@ def check_abi_compatibility(compiler, verbose=False): ...@@ -930,7 +930,7 @@ def check_abi_compatibility(compiler, verbose=False):
return True return True
warnings.warn( warnings.warn(
ABI_INCOMPATIBILITY_WARNING.format( ABI_INCOMPATIBILITY_WARNING.format(
user_compiler=compiler, version=version.strip())) user_compiler=compiler, version='.'.join(version)))
return False return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册