summaryrefslogtreecommitdiff
path: root/test/sql/test_case_statement.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-07-20 11:03:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-07-21 16:00:12 -0400
commit27ec4929198807702190b96d3c00d0291976f49e (patch)
tree210716d7c12dcd4e3c17376730e4e6b2794fc792 /test/sql/test_case_statement.py
parente72106d1499ec628487f7e428e7c49acdd4eb9c0 (diff)
downloadsqlalchemy-27ec4929198807702190b96d3c00d0291976f49e.tar.gz
dont warn for dictionary passed positionally
Fixed issue where use of the :paramref:`_sql.case.whens` parameter passing a dictionary positionally and not as a keyword argument would emit a 2.0 deprecation warning, referring to the deprecation of passing a list positionally. The dictionary format of "whens", passed positionally, is still supported and was accidentally marked as deprecated. Removes warning filter for case statement. Fixes: #6786 Change-Id: I8efd1882563773bec89ae5e34f0dfede77fc4683
Diffstat (limited to 'test/sql/test_case_statement.py')
-rw-r--r--test/sql/test_case_statement.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/sql/test_case_statement.py b/test/sql/test_case_statement.py
index 7dd66840f..c6d5f0185 100644
--- a/test/sql/test_case_statement.py
+++ b/test/sql/test_case_statement.py
@@ -175,8 +175,7 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL):
),
argnames="test_case, expected",
)
- @testing.combinations(("positional",), ("kwarg",), argnames="argstyle")
- def test_when_dicts(self, argstyle, test_case, expected):
+ def test_when_dicts(self, test_case, expected):
t = table("test", column("col1"))
whens, value, else_ = testing.resolve_lambda(test_case, t=t)
@@ -188,10 +187,7 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL):
if else_ is not None:
kw["else_"] = else_
- if argstyle == "kwarg":
- return case(whens=whens, **kw)
- elif argstyle == "positional":
- return case(whens, **kw)
+ return case(whens, **kw)
# note: 1.3 also does not allow this form
# case([whens], **kw)