def test_images_good(tmpdir, fake_bar, svg_img_as_pypath):
    """Test BatteryIcon() with a good theme_path

    This theme path does contain all of the required images.
    """
    for name in BatteryIcon.icon_names:
        target = tmpdir.join(name + ".svg")
        svg_img_as_pypath.copy(target)

    batt = BatteryIcon(theme_path=str(tmpdir))
    batt.fontsize = 12
    batt.bar = fake_bar
    batt.setup_images()
    assert len(batt.images) == len(BatteryIcon.icon_names)
    for name, img in batt.images.items():
        assert isinstance(img, images.Img)
Test BatteryIcon() with a good theme_path

    This theme path does contain all of the required images.
    
test/widgets/test_battery.py