MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_m2o_compare_to_null

Method test_m2o_compare_to_null

test/orm/test_query.py:1687–1699  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1685 self._test(~(None == User.id), "users.id IS NOT NULL") # noqa
1686
1687 def test_m2o_compare_to_null(self):
1688 Address = self.classes.Address
1689 self._test(Address.user == None, "addresses.user_id IS NULL") # noqa
1690 self._test(
1691 ~(Address.user == None), "addresses.user_id IS NOT NULL" # noqa
1692 )
1693 self._test(
1694 ~(Address.user != None), "addresses.user_id IS NULL" # noqa
1695 )
1696 self._test(None == Address.user, "addresses.user_id IS NULL") # noqa
1697 self._test(
1698 ~(None == Address.user), "addresses.user_id IS NOT NULL" # noqa
1699 )
1700
1701 def test_o2m_compare_to_null_aliased(self):
1702 User = self.classes.User

Callers

nothing calls this directly

Calls 1

_testMethod · 0.95

Tested by

no test coverage detected