def test_set_stroke_handles_lists_of_color_objects(using_opengl_renderer): m = OpenGLVMobject() assert m.stroke_color.hex == "#fff" m.set_stroke([Color(PURE_BLUE), Color(PURE_GREEN), Color(PURE_RED)]) assert m.get_stroke_colors()[0].hex == "#00f" assert m.get_stroke_colors()[1].hex == "#0f0" assert m.get_stroke_colors()[2].hex == "#f00"
def test_set_stroke_handles_lists_of_strs(using_opengl_renderer): m = OpenGLVMobject() assert m.stroke_color.hex == "#fff" m.set_stroke([BLACK, BLUE, GREEN]) assert m.get_stroke_colors()[0] == Color(BLACK) assert m.get_stroke_colors()[1] == Color(BLUE) assert m.get_stroke_colors()[2] == Color(GREEN)