Skip to content

Commit 3bc6f8b

Browse files
[MERGE] Includes PR #325
Changes in file tests/test_fuzz.py: * added some missing docstrings
2 parents 7611eb5 + 49b82df commit 3bc6f8b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/test_fuzz.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,20 @@
7777

7878

7979
def onlyIfHasHypothesis(has_hypothesis):
80-
"""Decorator to handle optional loading."""
80+
"""
81+
Conditionally enable a class based on the availability of the hypothesis library.
82+
83+
If the provided flag is False, returns a dummy class with a placeholder method that does nothing,
84+
allowing tests dependent on hypothesis to be safely bypassed. If True, the original
85+
class is returned unchanged.
86+
87+
Arguments:
88+
has_hypothesis (bool): Flag indicating whether the hypothesis library is available.
89+
90+
Returns:
91+
callable: A decorator function that returns either the original class or a dummy class
92+
with a placeholder method, depending on the has_hypothesis flag.
93+
"""
8194
def decorator(cls):
8295
if not has_hypothesis:
8396
# Create an empty class with a method that returns None

0 commit comments

Comments
 (0)