Skip to content

Commit 448c159

Browse files
committed
-
1 parent 170fec2 commit 448c159

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

source_py3/python_toolbox/cute_testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def manage_context(self):
110110
def assert_same_signature(*callables):
111111
'''Assert that all the `callables` have the same function signature.'''
112112
arg_specs = [cute_inspect.getargspec(callable_) for callable_ in callables]
113-
if not logic_tools.all_equivalent(arg_specs, exhaustive=True):
113+
if not logic_tools.all_equivalent(arg_specs, assume_transitive=False):
114114
raise Failure('Not all the callables have the same signature.')
115115

116116

source_py3/python_toolbox/logic_tools.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,9 @@ def all_equivalent(iterable, relation=operator.eq, *, assume_reflexive=True,
2929
can use `assume_reflexive=False`, `assume_symmetric=False` and
3030
`assume_transitive=False` to break any of these assumptions and make this
3131
function do more checks that the equivalence holds between any pair of
32-
items from the iterable.
33-
34-
If `exhaustive` is set to `False`, it's assumed that the
35-
equality relation is transitive, therefore not every member is tested
36-
against every other member. So in a list of size `n`, `n-1` equality checks
37-
will be made.
38-
39-
If `exhaustive` is set to `True`, every member will be checked against
40-
every other member. So in a list of size `n`, `(n*(n-1))/2` equality checks
41-
will be made.
32+
items from the iterable. (The more assumptions you ask to break, the more
33+
checks this function does before it concludes that the relation holds
34+
between all items.)
4235
'''
4336
from python_toolbox import sequence_tools
4437

0 commit comments

Comments
 (0)