MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_empty_clauses

Method test_empty_clauses

test/sql/test_operators.py:1658–1671  ·  view source on GitHub ↗
(self, op, str_op, str_continue, str_continue_2)

Source from the content-addressed store, hash-verified

1656 (or_, "or_", r"false", "False"),
1657 )
1658 def test_empty_clauses(self, op, str_op, str_continue, str_continue_2):
1659 # these warning classes will change to ArgumentError when the
1660 # deprecated behavior is disabled
1661
1662 with expect_deprecated(
1663 re.escape(
1664 f"Invoking {str_op}() without arguments is deprecated, and "
1665 "will be disallowed in a future release. For an empty "
1666 f"{str_op}() construct, use "
1667 f"'{str_op}({str_continue}(), *args)' or "
1668 f"'{str_op}({str_continue_2}, *args)'."
1669 )
1670 ):
1671 op()
1672
1673 def test_empty_construct_for_whereclause(self):
1674 eq_(BooleanClauseList._construct_for_whereclause(()), None)

Callers

nothing calls this directly

Calls 2

expect_deprecatedFunction · 0.90
opFunction · 0.85

Tested by

no test coverage detected