# Path: pywal/colors.py
# def list_backends():
# def normalize_img_path(img: str):
# def colors_to_dict(colors, img):
# def generic_adjust(colors, light):
# def saturate_colors(colors, amount):
# def cache_fname(img, backend, light, cache_dir, sat=""):
# def get_backend(backend):
# def palette():
# def get(img, light=False, backend="wal", cache_dir=CACHE_DIR, sat=""):
# def file(input_file):


import unittest
from pywal import colors
"""Test imagemagick functions."""



class TestGenColors(unittest.TestCase):
    """Test the gen_colors functions."""

    def test_gen_colors(self):
        """> Generate a colorscheme."""
        result = colors.get("tests/test_files/test.jpg")
        self.assertEqual(len(result["colors"]["color0"]), 7)

    def test_color_import(self):
        """> Read colors from a file."""
        result = colors.file("tests/test_files/test_file.json")
        self.assertEqual(result["colors"]["color0"], "#1F211E")

    def test_color_import_no_wallpaper(self):
        """> Read colors from a file without a wallpaper."""

# Path: pywal/colors.py
# def list_backends():
# def normalize_img_path(img: str):
# def colors_to_dict(colors, img):
# def generic_adjust(colors, light):
# def saturate_colors(colors, amount):
# def cache_fname(img, backend, light, cache_dir, sat=""):
# def get_backend(backend):
# def palette():
# def get(img, light=False, backend="wal", cache_dir=CACHE_DIR, sat=""):
# def file(input_file):


# Path: tests/test_colors.py
import unittest
from pywal import colors

"""Test imagemagick functions."""



class TestGenColors(unittest.TestCase):
    """Test the gen_colors functions."""

    def test_gen_colors(self):
        """> Generate a colorscheme."""
        result = colors.get("tests/test_files/test.jpg")
        self.assertEqual(len(result["colors"]["color0"]), 7)

    def test_color_import(self):
        """> Read colors from a file."""
        result = colors.file("tests/test_files/test_file.json")
        self.assertEqual(result["colors"]["color0"], "#1F211E")

    def test_color_import_no_wallpaper(self):
        """> Read colors from a file without a wallpaper."""

        result = colors.file("tests/test_files/test_file2.json")