You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Blueprints.
Issue description
test_mock_abstract_enum_is_abstract catches a TypeError, but the wrong one.
Fix:
classMockAbstractEnumWithMembers(Enum, metaclass=ABCEnumMeta):
"""Mock class with members for testing the ABCEnumMeta class."""A="a"@abstractmethoddeftest_method(self) ->int:
"""Test method for the MockAbstractEnum class."""
deftest_mock_abstract_enum_is_abstract(self) ->None:
"""Test case for MockAbstractEnum class to check if it's an abstract class."""assertMockAbstractEnum.__abstractmethods__==frozenset({"test_method"})
withpytest.raises(TypeError) aserror_info:
_=MockAbstractEnumWithMembers("a") # type: ignore[abstract]assertstr(error_info.value) =="Can't instantiate abstract class 'MockAbstractEnumWithMembers' without an implementation for abstract method 'test_method'"
Reproducible example
The last assert would show that the TypeError in current implementation of the test is not the right one.
deftest_mock_abstract_enum_is_abstract(self) ->None:
"""Test case for MockAbstractEnum class to check if it's an abstract class."""assertMockAbstractEnum.__abstractmethods__==frozenset({"test_method"})
withpytest.raises(TypeError) aserror_info:
_=MockAbstractEnumWithMembers("a") # type: ignore[abstract]assertstr(error_info.value) =="Can't instantiate abstract class 'MockAbstractEnumWithMembers' without an implementation for abstract method 'test_method'"
Expected behavior
wrong test
Installed versions
latest
The text was updated successfully, but these errors were encountered:
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Blueprints.
Issue description
test_mock_abstract_enum_is_abstract catches a TypeError, but the wrong one.
Fix:
Reproducible example
The last assert would show that the TypeError in current implementation of the test is not the right one.
Expected behavior
wrong test
Installed versions
The text was updated successfully, but these errors were encountered: