MCPcopy
hub / github.com/python-attrs/attrs / test_mix

Method test_mix

tests/test_make.py:2566–2575  ·  view source on GitHub ↗

If cmp is not None, eq and order must be None and vice versa.

(self, cmp, eq, order)

Source from the content-addressed store, hash-verified

2564
2565 @given(cmp=booleans(), eq=optional_bool, order=optional_bool)
2566 def test_mix(self, cmp, eq, order):
2567 """
2568 If cmp is not None, eq and order must be None and vice versa.
2569 """
2570 assume(eq is not None or order is not None)
2571
2572 with pytest.raises(
2573 ValueError, match="Don't mix `cmp` with `eq' and `order`"
2574 ):
2575 _determine_attrs_eq_order(cmp, eq, order, True)
2576
2577
2578class TestDetermineAttribEqOrder:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected