fix test_check_abi (#31288)

test_model_benchmark_ci
Zhou Wei 4 years ago committed by GitHub
parent 1da3280660
commit aebf223478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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):
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

Loading…
Cancel
Save