We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
feature-add-import-regression-testing-151
1 parent 7a86564 commit 8f65227Copy full SHA for 8f65227
tests/test_fuzz.py
@@ -77,7 +77,15 @@
77
78
79
def onlyIfHasHypothesis(has_hypothesis):
80
- """Decorator to handle optional loading."""
+ """Conditionally enable a class based on the availability of the hypothesis library.
81
+
82
+ If the provided flag is False, returns a dummy class with a placeholder method that does nothing,
83
+ allowing tests dependent on hypothesis to be safely bypassed. If True, the original class is returned
84
+ unchanged.
85
86
+ Args:
87
+ has_hypothesis (bool): Flag indicating whether the hypothesis library is available.
88
+ """
89
def decorator(cls):
90
if not has_hypothesis:
91
# Create an empty class with a method that returns None
0 commit comments