MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_roundtrip_future

Method test_roundtrip_future

test/ext/test_horizontal_shard.py:403–421  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

401 )
402
403 def test_roundtrip_future(self):
404 sess = self._fixture_data()
405
406 tokyo = (
407 sess.execute(select(WeatherLocation).filter_by(city="Tokyo"))
408 .scalars()
409 .one()
410 )
411 eq_(tokyo.city, "Tokyo")
412
413 asia_and_europe = sess.execute(
414 select(WeatherLocation).filter(
415 WeatherLocation.continent.in_(["Europe", "Asia"])
416 )
417 ).scalars()
418 eq_(
419 {c.city for c in asia_and_europe},
420 {"Tokyo", "London", "Dublin"},
421 )
422
423 def test_roundtrip(self):
424 sess = self._fixture_data()

Callers

nothing calls this directly

Calls 9

_fixture_dataMethod · 0.95
selectFunction · 0.90
eq_Function · 0.90
oneMethod · 0.45
scalarsMethod · 0.45
executeMethod · 0.45
filter_byMethod · 0.45
filterMethod · 0.45
in_Method · 0.45

Tested by

no test coverage detected