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

Method test_methods

test/typing/test_overloads.py:66–78  ·  view source on GitHub ↗
(self, class_, expected)

Source from the content-addressed store, hash-verified

64 (Executable, orm_execution_options),
65 )
66 def test_methods(self, class_, expected):
67 from typing import get_overloads
68
69 overloads = get_overloads(getattr(class_, "execution_options"))
70 eq_(len(overloads), 2)
71 annotations = overloads[0].__annotations__.copy()
72 annotations.pop("self", None)
73 annotations.pop("return", None)
74 eq_(annotations, expected)
75 annotations = overloads[1].__annotations__.copy()
76 annotations.pop("self", None)
77 annotations.pop("return", None)
78 eq_(annotations, {"opt": "Any"})
79
80 @testing.combinations(
81 (CoreExecuteOptionsParameter, core_execution_options),

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
copyMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected