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

Method test_all_present

test/sql/test_compare.py:1684–1706  ·  view source on GitHub ↗

test for elements that are in SQLAlchemy Core, that they are also included in the fixtures above.

(self)

Source from the content-addressed store, hash-verified

1682 ]
1683
1684 def test_all_present(self):
1685 """test for elements that are in SQLAlchemy Core, that they are
1686 also included in the fixtures above.
1687
1688 """
1689 need = set(
1690 cls
1691 for cls in all_hascachekey_subclasses(
1692 ignore_subclasses=[Annotated, NoInit, SingletonConstant]
1693 )
1694 if "orm" not in cls.__module__
1695 and "compiler" not in cls.__module__
1696 and "dialects" not in cls.__module__
1697 and issubclass(cls, (ColumnElement, Selectable, LambdaElement))
1698 )
1699
1700 for fixture in self.fixtures + self.dont_compare_values_fixtures:
1701 case_a = fixture()
1702 for elem in case_a:
1703 for mro in type(elem).__mro__:
1704 need.discard(mro)
1705
1706 is_false(bool(need), "%d Remaining classes: %r" % (len(need), need))
1707
1708 def test_compare_labels(self):
1709 for fixtures_, compare_values in [

Callers

nothing calls this directly

Calls 4

is_falseFunction · 0.90
fixtureFunction · 0.50
discardMethod · 0.45

Tested by

no test coverage detected