# Path: libxyz/ui/colors.py
# class Color(object):
# class Foreground(Color):
# class Background(Color):
# class Attribute(Color):
# class BaseHighColor(Color):
# class ForegroundHigh(BaseHighColor):
# class BackgroundHigh(BaseHighColor):
# class Palette(object):
#     def __init__(self, color):
#     def is_color_valid(self, color):
#     def _set_color(self, color):
#     def __str__(self):
#     def __repr__(self):
#     def is_color_valid(self, color):
#     def _set_color(self, color):
#     def convert(cls, config):
#     def __init__(self, name, fg, bg, fg_attrs=None, mono=None,
#                  fg_high=None, bg_high=None):
#     def _fg_get(self):
#     def _fg_set(self, fg):
#     def _bg_get(self):
#     def _bg_set(self, bg):
#     def _fg_attrs_get(self):
#     def _fg_attrs_set(self, attrs):
#     def _mono_get(self):
#     def _mono_set(self, mono):
#     def _fg_high_get(self):
#     def _fg_high_set(self, fg_high):
#     def _bg_high_get(self):
#     def _bg_high_set(self, bg_high):
#     def get_palette(self, display=const.DEFAULT_DISPLAY_DRIVER):
#     def set_fg(self, fg):
#     def set_bg(self, bg):
#     def copy(self):
#     def __call__(self, config):
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass


from nose.tools import raises
from libxyz.ui import colors
from libxyz.exceptions import XYZValueError
import __builtin__
import locale
        assert colors.Background("DARK_BLUE")
        assert colors.Background("DARK_MAGENTA")
        assert colors.Background("DARK_CYAN")

        assert colors.Background("LIGHT_GRAY")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    @raises(XYZValueError)
    def testAttributeColor1(self):
        """
        Raise error on wrong attribute
        """

        colors.Attribute("AAA")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def testAttributeColor2(self):
        """
        Check correct attribute
        """

        assert colors.Attribute("BOLD")
        assert colors.Attribute("UNDERLINE")
        assert colors.Attribute("BLINK")
        assert colors.Attribute("STANDOUT")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Path: libxyz/ui/colors.py
# class Color(object):
# class Foreground(Color):
# class Background(Color):
# class Attribute(Color):
# class BaseHighColor(Color):
# class ForegroundHigh(BaseHighColor):
# class BackgroundHigh(BaseHighColor):
# class Palette(object):
#     def __init__(self, color):
#     def is_color_valid(self, color):
#     def _set_color(self, color):
#     def __str__(self):
#     def __repr__(self):
#     def is_color_valid(self, color):
#     def _set_color(self, color):
#     def convert(cls, config):
#     def __init__(self, name, fg, bg, fg_attrs=None, mono=None,
#                  fg_high=None, bg_high=None):
#     def _fg_get(self):
#     def _fg_set(self, fg):
#     def _bg_get(self):
#     def _bg_set(self, bg):
#     def _fg_attrs_get(self):
#     def _fg_attrs_set(self, attrs):
#     def _mono_get(self):
#     def _mono_set(self, mono):
#     def _fg_high_get(self):
#     def _fg_high_set(self, fg_high):
#     def _bg_high_get(self):
#     def _bg_high_set(self, bg_high):
#     def get_palette(self, display=const.DEFAULT_DISPLAY_DRIVER):
#     def set_fg(self, fg):
#     def set_bg(self, bg):
#     def copy(self):
#     def __call__(self, config):
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass


# Path: libxyz/ui/tests.py
from nose.tools import raises
from libxyz.ui import colors
from libxyz.exceptions import XYZValueError
import __builtin__
import locale

        assert colors.Background("DARK_BLUE")
        assert colors.Background("DARK_MAGENTA")
        assert colors.Background("DARK_CYAN")

        assert colors.Background("LIGHT_GRAY")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    @raises(XYZValueError)
    def testAttributeColor1(self):
        """
        Raise error on wrong attribute
        """

        colors.Attribute("AAA")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def testAttributeColor2(self):
        """
        Check correct attribute
        """

        assert colors.Attribute("BOLD")
        assert colors.Attribute("UNDERLINE")
        assert colors.Attribute("BLINK")
        assert colors.Attribute("STANDOUT")

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    @raises(XYZValueError)