toyplot.testing module

toyplot.testing.assert_canvas_equal(canvas, name)[source]
toyplot.testing.assert_color_equal(a, b)[source]

Raise an exception if a toyplot color doesn’t match a reference.

Parameters:
  • a (toyplot RGBA color, required)
  • b (4-tuple)
toyplot.testing.assert_colors_equal(a, b)[source]

Raise an exception if sequence of toyplot colors don’t match a reference.

Parameters:
  • a (sequence of toyplot RGBA colors, required)
  • b (sequence of 4-tuples)
toyplot.testing.assert_html_equal(html, name)[source]

Raise an exception if HTML content doesn’t match a reference.

Parameters:
  • html (string, required) – The HTML content to be compared.
  • name (string, required) – Unique identifier of the reference file to use as a comparison. The reference file will be located at toyplot/features/reference/<name>.html
toyplot.testing.read_png(fobj)[source]