(httpie_plugins, httpie_plugins_success, dummy_plugin, broken_plugin)
| 134 | |
| 135 | @pytest.mark.requires_installation |
| 136 | def test_broken_plugins(httpie_plugins, httpie_plugins_success, dummy_plugin, broken_plugin): |
| 137 | httpie_plugins_success("install", dummy_plugin.path, broken_plugin.path) |
| 138 | |
| 139 | with pytest.warns( |
| 140 | UserWarning, |
| 141 | match=( |
| 142 | f'While loading "{broken_plugin.name}", an error' |
| 143 | ' occurred: broken plugin' |
| 144 | ) |
| 145 | ): |
| 146 | data = parse_listing(httpie_plugins_success('list')) |
| 147 | assert len(data) == 2 |
| 148 | |
| 149 | # We load before the uninstallation, so it will warn again. |
| 150 | with pytest.warns(UserWarning): |
| 151 | httpie_plugins_success("uninstall", broken_plugin.name) |
| 152 | |
| 153 | # No warning now, since it is uninstalled. |
| 154 | data = parse_listing(httpie_plugins_success('list')) |
| 155 | assert len(data) == 1 |
nothing calls this directly
no test coverage detected