From 7b0aef28e3012cf04f991fec00294e99a7f1f13e Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Fri, 9 Aug 2024 10:27:52 -0400 Subject: [PATCH] Update unit tests --- tests/test_api_convert.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_api_convert.py b/tests/test_api_convert.py index ab70e19cd3..a2651ceba0 100644 --- a/tests/test_api_convert.py +++ b/tests/test_api_convert.py @@ -121,14 +121,13 @@ def test_c_extension_error(base_platform, package): download(f, fn) for platform in platforms: - with pytest.raises(CondaBuildUserError) as e: + with pytest.raises( + CondaBuildUserError, + match=f"WARNING: Package {fn} contains C extensions; skipping conversion. " + "Use -f to force conversion.", + ): api.convert(fn, platforms=platform) - assert ( - f"WARNING: Package {fn} contains C extensions; skipping conversion. " - "Use -f to force conversion." - ) in str(e.value) - @pytest.mark.parametrize("base_platform", ["linux", "win", "osx"]) @pytest.mark.parametrize("package", [("cryptography-1.8.1", "__about__.py")])