Re:Refactoring Python with Tree-sitter and Jedi
by morningsam on Saturday September 28, 2024 @03:00AM
(#41678454)
But does Rope understand pytest fixtures? I doubt it, but would be happy to be proven wrong.
[ Parent
| on HN ]
Re:Refactoring Python with Tree-sitter and Jedi
by westurner on Saturday September 28, 2024 @09:52PM
(#41684217)
Yeah, there `sed` and `git diff` with one or more filenames in a variable might do.
Because pytest requires a preprocessing step, renaming fixtures is tough, and also for jupyter notebooks %%ipytest is necessary to call functions that start with test_ and upgrade assert keywords to expressions; e.g `assert a == b, error_expr` is preprocessed into `assertEqual(a,b, error_expr)` with an AssertionError message even for comparisons of large lists and strings.