MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_update

Method test_update

test/sql/test_metadata.py:5541–5588  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5539 assert "foobar" in t.dialect_options["participating2"]
5540
5541 def test_update(self):
5542 with self._fixture():
5543 idx = Index("a", "b", "c", participating_x=20)
5544 eq_(idx.dialect_kwargs, {"participating_x": 20})
5545 idx._validate_dialect_kwargs(
5546 {"participating_x": 25, "participating_z_one": "default"}
5547 )
5548 eq_(
5549 idx.dialect_options,
5550 {"participating": {"x": 25, "y": False, "z_one": "default"}},
5551 )
5552 eq_(
5553 idx.dialect_kwargs,
5554 {"participating_x": 25, "participating_z_one": "default"},
5555 )
5556
5557 idx._validate_dialect_kwargs(
5558 {"participating_x": 25, "participating_z_one": "default"}
5559 )
5560
5561 eq_(
5562 idx.dialect_options,
5563 {"participating": {"x": 25, "y": False, "z_one": "default"}},
5564 )
5565 eq_(
5566 idx.dialect_kwargs,
5567 {"participating_x": 25, "participating_z_one": "default"},
5568 )
5569
5570 idx._validate_dialect_kwargs(
5571 {"participating_y": True, "participating2_y": "p2y"}
5572 )
5573 eq_(
5574 idx.dialect_options,
5575 {
5576 "participating": {"x": 25, "y": True, "z_one": "default"},
5577 "participating2": {"y": "p2y", "pp": "default", "x": 9},
5578 },
5579 )
5580 eq_(
5581 idx.dialect_kwargs,
5582 {
5583 "participating_x": 25,
5584 "participating_y": True,
5585 "participating2_y": "p2y",
5586 "participating_z_one": "default",
5587 },
5588 )
5589
5590 def test_key_error_kwargs_no_dialect(self):
5591 with self._fixture():

Callers

nothing calls this directly

Calls 4

_fixtureMethod · 0.95
IndexClass · 0.90
eq_Function · 0.90

Tested by

no test coverage detected