File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 7979def onlyIfHasHypothesis (has_hypothesis ):
8080 """
8181 Conditionally enable a class based on the availability of the hypothesis library.
82+
8283 If the provided flag is False, returns a dummy class with a placeholder method that does nothing,
8384 allowing tests dependent on hypothesis to be safely bypassed. If True, the original
8485 class is returned unchanged.
85- Args:
86+
87+ Arguments:
8688 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.
8793 """
8894 def decorator (cls ):
8995 if not has_hypothesis :
You can’t perform that action at this time.
0 commit comments