MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_empty_clauses

Method test_empty_clauses

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

Source from the content-addressed store, hash-verified

1504 (or_, "or_", r"false", "False"),
1505 )
1506 def test_empty_clauses(self, op, str_op, str_continue, str_continue_2):
1507 # these warning classes will change to ArgumentError when the
1508 # deprecated behavior is disabled
1509
1510 with expect_deprecated(
1511 re.escape(
1512 f"Invoking {str_op}() without arguments is deprecated, and "
1513 "will be disallowed in a future release. For an empty "
1514 f"{str_op}() construct, use "
1515 f"'{str_op}({str_continue}(), *args)' or "
1516 f"'{str_op}({str_continue_2}, *args)'."
1517 )
1518 ):
1519 op()
1520
1521 def test_empty_construct_for_whereclause(self):
1522 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