MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / phase1

Method phase1

test/sql-feature-flags/mzcompose.py:121–142  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

119
120 @classmethod
121 def phase1(cls) -> str:
122 return "\n\n".join(
123 [
124 # Include the header.
125 header(f"{cls.__name__} (phase 1)", drop_schema=True),
126 cls.initialize(),
127 # Ensure the feature is off, regardless of CI config.
128 alter_system_set(cls.feature_name(), "off"),
129 # We cannot create item #1 when the feature is turned off (default).
130 statement_error(cls.create_item(ordinal=1), cls.feature_error()),
131 # Turn the feature on.
132 alter_system_set(cls.feature_name(), "on"),
133 # We can create item #1 when the feature is turned on.
134 statement_ok(cls.create_item(ordinal=1)),
135 # We can query item #1 when the feature is turned on.
136 query_ok(cls.query_item(ordinal=1)),
137 # Turn the feature off.
138 alter_system_set(cls.feature_name(), "off"),
139 # We cannot create item #2 when the feature is turned off.
140 statement_error(cls.create_item(ordinal=2), cls.feature_error()),
141 ]
142 )
143
144 @classmethod
145 def phase2(cls) -> str:

Callers 1

run_testFunction · 0.80

Calls 11

alter_system_setFunction · 0.85
statement_errorFunction · 0.85
statement_okFunction · 0.85
query_okFunction · 0.85
feature_nameMethod · 0.80
feature_errorMethod · 0.80
query_itemMethod · 0.80
headerFunction · 0.70
joinMethod · 0.45
initializeMethod · 0.45
create_itemMethod · 0.45

Tested by

no test coverage detected