Commits

Paweł Piotr Przeradowski  committed 5a49fbe

failing test for color_content

  • Participants
  • Parent commits c3992b3
  • Branches curses_fixes

Comments (0)

Files changed (1)

File pypy/module/test_lib_pypy/test_curses.py

+import _curses
+
+lib = _curses.lib
+
+
+def test_color_content(monkeypatch):
+    def color_content(color, r, g, b):
+        r[0], g[0], b[0] = 42, 43, 44
+        return lib.OK
+
+    monkeypatch.setattr(_curses, '_ensure_initialised_color', lambda: None)
+    monkeypatch.setattr(lib, 'color_content', color_content)
+
+    assert _curses.color_content(None) == (42, 43, 44)