MCPcopy Create free account
hub / github.com/ipython/ipython / test_inputhook_qt

Function test_inputhook_qt

tests/test_pt_inputhooks.py:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 len(guis_avail) == 0, reason="No viable version of PyQt or PySide installed."
34)
35def test_inputhook_qt():
36 # Choose the "best" Qt version.
37 gui_ret, _ = get_inputhook_name_and_func("qt")
38
39 assert gui_ret != "qt" # you get back the specific version that was loaded.
40 assert gui_ret in guis_avail
41
42 if len(guis_avail) > 2:
43 # ...and now we're stuck with this version of Qt for good; can't switch.
44 for not_gui in ["qt6", "qt5"]:
45 if not_gui != gui_ret:
46 break
47 # Try to import the other gui; it won't work.
48 gui_ret2, _ = get_inputhook_name_and_func(not_gui)
49 assert gui_ret2 == gui_ret
50 assert gui_ret2 != not_gui

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…