Commit 375c236
committed
Simplify TestProgram._get_runner
This try-except was necessary to support an instance of a runner being
passed that did not support the `tb_locals` parameter. This appears to
be a compat handler for Python 2.x variants of `TextTestRunner`, which
did not accept this parameter [1]. This is not the case of the lowest
version of Python we currently support, 3.10 [2], meaning we can remove
the wrapper.
[1] https://github.com/python/cpython/blob/v2.7.1/Lib/unittest/runner.py#L127-L128
[2] https://github.com/python/cpython/blob/v3.10.0/Lib/unittest/runner.py#L128-L130
Signed-off-by: Stephen Finucane <stephen@that.guru>1 parent c16ef98 commit 375c236
1 file changed
+7
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
286 | 277 | | |
287 | 278 | | |
288 | 279 | | |
| |||
0 commit comments