kiva.testing module¶
-
class
kiva.testing.
KivaTestAssistant
[source]¶ Bases:
object
Mixin test helper for kiva drawing tests.
-
assertPathsAreCreated
(drawable, width=200, height=200)[source]¶ Check that drawing creates paths.
When paths and lines creation methods are used from a graphics context the drawing paths are compiled and processed. By using a mock graphics context we can check if something has been drawn.
-
assertPathsAreProcessed
(drawable, width=200, height=200)[source]¶ Check that all the paths have been compiled and processed.
-
create_mock_gc
(width, height, methods=())[source]¶ Create an image graphics context that with mocked methods.
- Parameters
width – The size of the graphics context canvas.
height – The size of the graphics context canvas.
methods (iterable) – the methods which are going to be mocked with a Mock object.
-