MCPcopy
hub / github.com/django/django / high_contrast

Method high_contrast

django/test/selenium.py:227–235  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

225
226 @contextmanager
227 def high_contrast(self):
228 self.set_emulated_media(features=[{"name": "forced-colors", "value": "active"}])
229 with self.desktop_size():
230 try:
231 yield
232 finally:
233 self.set_emulated_media(
234 features=[{"name": "forced-colors", "value": "none"}]
235 )
236
237 def take_screenshot(self, name):
238 if not self.screenshots:

Callers

nothing calls this directly

Calls 2

set_emulated_mediaMethod · 0.95
desktop_sizeMethod · 0.95

Tested by

no test coverage detected