55Handy functions for testing code.
66
77Requires `pytest <https://docs.pytest.org/en/stable/>`_ to be installed.
8+
9+ .. versionadded:: 0.4.9
810"""
911#
1012# Copyright © 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
3840# this package
3941from domdf_python_tools .utils import Len
4042
43+ __all__ = [
44+ "generate_truthy_values" ,
45+ "generate_falsy_values" ,
46+ "testing_boolean_values" ,
47+ "whitespace" ,
48+ "whitespace_perms_list" ,
49+ "whitespace_perms" ,
50+ "count" ,
51+ ]
52+
4153
4254def generate_truthy_values (extra_truthy : Sequence = (), ratio : float = 1 ) -> Iterator [Any ]:
4355 """
@@ -47,6 +59,8 @@ def generate_truthy_values(extra_truthy: Sequence = (), ratio: float = 1) -> Ite
4759
4860 :param extra_truthy: Additional values that should be considered :py:obj:`True`.
4961 :param ratio: The ratio of the number of values to select to the total number of values.
62+
63+ .. versionadded:: 0.4.9
5064 """
5165
5266 truthy_values = [
@@ -81,6 +95,8 @@ def generate_falsy_values(extra_falsy: Sequence = (), ratio: float = 1) -> Itera
8195
8296 :param extra_falsy: Additional values that should be considered :py:obj:`True`.
8397 :param ratio: The ratio of the number of values to select to the total number of values.
98+
99+ .. versionadded:: 0.4.9
84100 """
85101
86102 falsy_values = [
@@ -124,6 +140,8 @@ def testing_boolean_values(
124140 :param extra_truthy: Additional values that should be considered :py:obj:`True`.
125141 :param extra_falsy: Additional values that should be considered :py:obj:`False`.
126142 :param ratio: The ratio of the number of values to select to the total number of values.
143+
144+ .. versionadded:: 0.4.9
127145 """
128146
129147 truthy = generate_truthy_values (extra_truthy , ratio )
@@ -157,6 +175,8 @@ def whitespace_perms(ratio: float = 0.5) -> MarkDecorator:
157175 The single parametrized argument is ``char``.
158176
159177 :param ratio: The ratio of the number of permutations to select to the total number of permutations.
178+
179+ .. versionadded:: 0.4.9
160180 """
161181
162182 perms = whitespace_perms_list ()
@@ -173,6 +193,8 @@ def count(stop: int, start: int = 0, step: int = 1) -> MarkDecorator:
173193 :param stop: The stop value passed to :class:`range`.
174194 :param start: The start value passed to :class:`range`.
175195 :param step: The step passed to :class:`range`.
196+
197+ .. versionadded:: 0.4.9
176198 """
177199
178200 return pytest .mark .parametrize ("count" , range (start , stop , step ))
0 commit comments