# Path: css2video/constants.py
# class ValueType(object):
#     """Class to define constants for value types"""
# 
#     number = 'number'
#     length = 'length'
#     percentage = 'percentage'
#     time = 'time'
#     color = 'color'
#     text = 'text'
#     url = 'url'
#     function = 'function'
#     array = 'array'
# 
# Path: css2video/parsers/value.py
# class Text(BaseParser):
#     """Parse a text value"""
# 
#     ParseException = TextParseException
# 
#     @classmethod
#     def grammar(cls):
#         """Grammar to parse a text value"""
#         return pp.Word(pp.alphas + '-')
# 
#     @classmethod
#     def parse_action(cls, tokens):
#         """Returns a dictionary from the parsed tokens"""
#         return {
#             'type': ValueType.text,
#             'value': tokens[0]
#         }
# 
# class TextParseException(Exception):
#     """Raised when there is an exception while parsing a text value"""
#     pass


import unittest
from css2video.constants import ValueType
from css2video.parsers.value import Text, TextParseException



class TestCase(unittest.TestCase):

    def test_parser(self):
        response = Text.parse('inline-block')
        self.assertEqual(
            response, dict(type=ValueType.text, value='inline-block'))

        with self.assertRaises(TextParseException):

# Path: css2video/constants.py
# class ValueType(object):
#     """Class to define constants for value types"""
# 
#     number = 'number'
#     length = 'length'
#     percentage = 'percentage'
#     time = 'time'
#     color = 'color'
#     text = 'text'
#     url = 'url'
#     function = 'function'
#     array = 'array'
# 
# Path: css2video/parsers/value.py
# class Text(BaseParser):
#     """Parse a text value"""
# 
#     ParseException = TextParseException
# 
#     @classmethod
#     def grammar(cls):
#         """Grammar to parse a text value"""
#         return pp.Word(pp.alphas + '-')
# 
#     @classmethod
#     def parse_action(cls, tokens):
#         """Returns a dictionary from the parsed tokens"""
#         return {
#             'type': ValueType.text,
#             'value': tokens[0]
#         }
# 
# class TextParseException(Exception):
#     """Raised when there is an exception while parsing a text value"""
#     pass


# Path: tests/parsers/value/test_text.py
import unittest
from css2video.constants import ValueType
from css2video.parsers.value import Text, TextParseException




class TestCase(unittest.TestCase):

    def test_parser(self):
        response = Text.parse('inline-block')
        self.assertEqual(
            response, dict(type=ValueType.text, value='inline-block'))

        with self.assertRaises(TextParseException):

            Text.parse('inline block')