MCPcopy Index your code
hub / github.com/httpie/cli / test_broken_plugins

Function test_broken_plugins

tests/test_plugins_cli.py:136–155  ·  view source on GitHub ↗
(httpie_plugins, httpie_plugins_success, dummy_plugin, broken_plugin)

Source from the content-addressed store, hash-verified

134
135@pytest.mark.requires_installation
136def 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

Callers

nothing calls this directly

Calls 2

parse_listingFunction · 0.90
httpie_plugins_successFunction · 0.85

Tested by

no test coverage detected