MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_methods

Method test_methods

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

Source from the content-addressed store, hash-verified

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