MCPcopy Index your code
hub / github.com/questdb/questdb / main

Function main

compat/src/test/python/runner_psycopg3.py:211–238  ·  view source on GitHub ↗
(yaml_file)

Source from the content-addressed store, hash-verified

209
210
211def main(yaml_file):
212 data = load_yaml(yaml_file)
213 global_variables = data.get('variables', {})
214 tests = data.get('tests', [])
215
216 port = int(os.getenv('PGPORT', 8812))
217 for binary in [True, False]:
218 binary_mode = "binary" if binary else "text"
219 print(f"\n=== Running tests with {binary_mode} mode ===\n")
220 for test in tests:
221 iterations = test.get('iterations', 50)
222 exclusions = test.get('exclude', [])
223 if 'psycopg3' in exclusions:
224 print(f"Skipping test '{test['name']}' because it is excluded for psycopg3.")
225 continue
226 for i in range(iterations):
227 print(f"Running test '{test['name']}' [{binary_mode}] (iteration {i + 1})")
228 connection = psycopg.connect(
229 host='localhost',
230 port=port,
231 user='admin',
232 password='quest',
233 dbname='qdb',
234 autocommit=True
235 )
236 register_varchar_array_type(connection, binary)
237 run_test(test, global_variables, connection, binary)
238 connection.close()
239
240
241if __name__ == '__main__':

Callers 1

runner_psycopg3.pyFile · 0.70

Calls 6

load_yamlFunction · 0.85
run_testFunction · 0.70
getMethod · 0.65
connectMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…