Skip to content

📝 Add docstrings to feature-add-import-regression-testing-151 #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion tests/test_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,20 @@


def onlyIfHasHypothesis(has_hypothesis):
"""Decorator to handle optional loading."""
"""
Conditionally enable a class based on the availability of the hypothesis library.

If the provided flag is False, returns a dummy class with a placeholder method that does nothing,
allowing tests dependent on hypothesis to be safely bypassed. If True, the original
class is returned unchanged.

Arguments:
has_hypothesis (bool): Flag indicating whether the hypothesis library is available.

Returns:
callable: A decorator function that returns either the original class or a dummy class
with a placeholder method, depending on the has_hypothesis flag.
"""
def decorator(cls):
if not has_hypothesis:
# Create an empty class with a method that returns None
Expand Down
Loading