(self, cls)
| 3141 | |
| 3142 | @contextmanager |
| 3143 | def _proxy_fixture(self, cls): |
| 3144 | self.table = self.tables.test |
| 3145 | |
| 3146 | class ExcCtx(default.DefaultExecutionContext): |
| 3147 | def post_exec(self): |
| 3148 | if cls is _cursor.CursorFetchStrategy: |
| 3149 | pass |
| 3150 | elif cls is _cursor.BufferedRowCursorFetchStrategy: |
| 3151 | self.cursor_fetch_strategy = cls( |
| 3152 | self.cursor, self.execution_options |
| 3153 | ) |
| 3154 | elif cls is _cursor.FullyBufferedCursorFetchStrategy: |
| 3155 | self.cursor_fetch_strategy = cls( |
| 3156 | self.cursor, |
| 3157 | self.cursor.description, |
| 3158 | self.cursor.fetchall(), |
| 3159 | ) |
| 3160 | else: |
| 3161 | assert False |
| 3162 | |
| 3163 | self.patcher = patch.object( |
| 3164 | self.engine.dialect, "execution_ctx_cls", ExcCtx |
| 3165 | ) |
| 3166 | |
| 3167 | with self.patcher: |
| 3168 | yield |
| 3169 | |
| 3170 | def _test_proxy(self, cls): |
| 3171 | with self._proxy_fixture(cls): |
no test coverage detected