MCPcopy
hub / github.com/questdb/questdb / main

Function main

compat/src/test/python/runner_psycopg2.py:134–156  ·  view source on GitHub ↗
(yaml_file)

Source from the content-addressed store, hash-verified

132
133
134def main(yaml_file):
135 data = load_yaml(yaml_file)
136 global_variables = data.get('variables', {})
137 tests = data.get('tests', [])
138
139 port = int(os.getenv('PGPORT', 8812))
140 for test in tests:
141 iterations = test.get('iterations', 50)
142 exclusions = test.get('exclude', [])
143 if 'psycopg2' in exclusions:
144 print(f"Skipping test '{test['name']}' because it is excluded for psycopg2.")
145 continue
146 for i in range(iterations):
147 print(f"Running test '{test['name']}' iteration {i + 1}...")
148 connection = psycopg2.connect(
149 host='localhost',
150 port=port,
151 user='admin',
152 password='quest',
153 database='qdb'
154 )
155 run_test(test, global_variables, connection)
156 connection.close()
157
158
159if __name__ == '__main__':

Callers 1

runner_psycopg2.pyFile · 0.70

Calls 5

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…