(context, scenario)
| 164 | |
| 165 | |
| 166 | def before_scenario(context, scenario): |
| 167 | if scenario.name == "list databases": |
| 168 | # not using the cli for that |
| 169 | return |
| 170 | if is_known_problem(scenario): |
| 171 | scenario.skip() |
| 172 | currentdb = None |
| 173 | if "pgbouncer" in scenario.feature.tags: |
| 174 | if context.pgbouncer_available: |
| 175 | os.environ["PGDATABASE"] = "pgbouncer" |
| 176 | os.environ["PGPORT"] = "6432" |
| 177 | currentdb = "pgbouncer" |
| 178 | else: |
| 179 | scenario.skip() |
| 180 | else: |
| 181 | # set env vars back to normal test database |
| 182 | os.environ["PGDATABASE"] = context.conf["dbname"] |
| 183 | os.environ["PGPORT"] = context.conf["port"] |
| 184 | wrappers.run_cli(context, currentdb=currentdb) |
| 185 | wrappers.wait_prompt(context) |
| 186 | |
| 187 | |
| 188 | def after_scenario(context, scenario): |
nothing calls this directly
no test coverage detected