"""
AUTO-GENERATED BY Testing Kit v1

Routine tests for the viz builder and base plotter API.
"""
#import pytest

from pyparticle.viz.builder import build_plotter
from pyparticle.viz.base import Plotter


def test_build_plotter_missing_type_raises():
    with pytest.raises(ValueError):
        build_plotter(None, {})


def test_plotter_base_interface():
    # Create a trivial Plotter subclass instance via the base class to check interface
    p = Plotter(type='dummy', config={})
    assert hasattr(p, 'prep') and hasattr(p, 'plot')
    with pytest.raises(NotImplementedError):
        p.prep(None)
