diff --git a/tests/test_views.py b/tests/test_views.py index 89b3b8dd..c286685f 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -631,7 +631,9 @@ def test_display_color_editor(self): sphere = UsdGeom.Sphere.Define(stage, "/volume") color_var = sphere.GetDisplayColorPrimvar() editor = _attributes._DisplayColorEditor(color_var) - editor._update_value() + + with mock.patch("grill.views._attributes.QtWidgets.QColorDialog.getColor", new=lambda *_, **__: QtGui.QColor(255, 255, 0)): + editor._color_launchers["Color"][0].click() color_var.SetInterpolation(UsdGeom.Tokens.vertex) editor = _attributes._DisplayColorEditor(color_var) @@ -644,6 +646,9 @@ def test_display_color_editor(self): with self.assertRaises(TypeError): # atm some gprim types are not supported editor._update_value() + editor = _attributes._DisplayColorEditor(UsdGeom.Primvar()) + self.assertEqual(len(editor._value), 1) + def test_stats(self): # return empty = stats.StageStats()