MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _has_oracle_test_dblink

Method _has_oracle_test_dblink

test/requirements.py:1701–1714  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

1699 return only_on(["+aioodbc", "+aiosqlite", "+aiomysql", "+asyncmy"])
1700
1701 def _has_oracle_test_dblink(self, key):
1702 def check(config):
1703 assert config.db.dialect.name == "oracle"
1704 name = config.file_config.get("sqla_testing", key)
1705 if not name:
1706 return False
1707 with config.db.connect() as conn:
1708 links = config.db.dialect._list_dblinks(conn)
1709 return config.db.dialect.normalize_name(name) in links
1710
1711 return only_on(["oracle"]) + only_if(
1712 check,
1713 f"{key} option not specified in config or dblink not found in db",
1714 )
1715
1716 @property
1717 def oracle_test_dblink(self):

Callers 2

oracle_test_dblinkMethod · 0.95
oracle_test_dblink2Method · 0.95

Calls 2

only_onFunction · 0.90
only_ifFunction · 0.90

Tested by

no test coverage detected