From 1c10b097a79008c8fb0107fb61831126784f8b88 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 22 Feb 2023 13:01:46 -0800 Subject: [PATCH] test_class_sh_void_ptr_capsule.py manual fixes for ruff --- tests/test_class_sh_void_ptr_capsule.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/test_class_sh_void_ptr_capsule.py b/tests/test_class_sh_void_ptr_capsule.py index 769b5db1f..1ca254d95 100644 --- a/tests/test_class_sh_void_ptr_capsule.py +++ b/tests/test_class_sh_void_ptr_capsule.py @@ -37,32 +37,30 @@ class AsAnotherObject: @pytest.mark.parametrize( - ("ctor", "caller", "expected", "capsule_generated"), + ("ctor", "caller", "expected"), [ - (Valid, m.get_from_valid_capsule, 1, True), - (AsAnotherObject, m.get_from_valid_capsule, 1, True), + (Valid, m.get_from_valid_capsule, 1), + (AsAnotherObject, m.get_from_valid_capsule, 1), ], ) -def test_valid_as_void_ptr_capsule_function(ctor, caller, expected, capsule_generated): +def test_valid_as_void_ptr_capsule_function(ctor, caller, expected): obj = ctor() assert caller(obj) == expected - assert obj.capsule_generated == capsule_generated + assert obj.capsule_generated @pytest.mark.parametrize( - ("ctor", "caller", "expected", "capsule_generated"), + ("ctor", "caller"), [ - (NoConversion, m.get_from_no_conversion_capsule, 2, False), - (NoCapsuleReturned, m.get_from_no_capsule_returned, 3, False), + (NoConversion, m.get_from_no_conversion_capsule), + (NoCapsuleReturned, m.get_from_no_capsule_returned), ], ) -def test_invalid_as_void_ptr_capsule_function( - ctor, caller, expected, capsule_generated -): +def test_invalid_as_void_ptr_capsule_function(ctor, caller): obj = ctor() with pytest.raises(TypeError): caller(obj) - assert obj.capsule_generated == capsule_generated + assert not obj.capsule_generated @pytest.mark.parametrize(