with pytest.raises(AssertionError):
bayeslite.bayesdb_import_sqlite_table(bdb, "u", metamodel="crosscat")
bayeslite.bayesdb_set_default_metamodel(bdb, None)
with pytest.raises(sqlite3.IntegrityError):
bayeslite.bayesdb_import_sqlite_table(bdb, "t", metamodel="dotdog")
bayeslite.bayesdb_set_default_metamodel(bdb, "dotdog")
bayeslite.bayesdb_import_sqlite_table(bdb, "u")
with pytest.raises(sqlite3.IntegrityError):
bayeslite.bayesdb_import_sqlite_table(bdb, "u")
After Change
bdb.execute("CREATE GENERATOR t_cc FOR t USING crosscat(a NUMERICAL)")
bayeslite.bayesdb_set_default_metamodel(bdb, None)
with pytest.raises(sqlite3.IntegrityError):
bdb.execute("CREATE GENERATOR t_dd FOR t USING dotdog(a NUMERICAL)")
// XXX Rest of test originally exercised default metamodel, but
// syntax doesn"t support that now. Not clear that"s wrong either.
bayeslite.bayesdb_set_default_metamodel(bdb, dotdog_metamodel)
bdb.execute("CREATE GENERATOR u_dd FOR u USING dotdog(a NUMERICAL)")