# Path: css2video/constants.py
# class RuleType(object):
#     """Class to define constants for rule types"""
# 
#     style = 'style'
#     keyframes = 'keyframes'
# 
# Path: css2video/parsers/rule.py
# class StyleParseException(Exception):
# class Style(BaseParser):
# class KeyframePropertiesParseException(Exception):
# class KeyframeProperties(BaseParser):
# class KeyframesParseException(Exception):
# class Keyframes(BaseParser):
# class RuleParseException(Exception):
# class Rule(object):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def parser(cls):


import unittest
from css2video.constants import RuleType
from css2video.parsers.rule import (
    Property, KeyframeProperties, KeyframePropertiesParseException,
    Keyframes, KeyframesParseException
)



class TestCase(unittest.TestCase):

    def test_keyframe_properties_parser(self):
        response = KeyframeProperties.parse('from { margin: 10px; }')
        self.assertEqual(response['selector'], 0.)
        self.assertEqual(response['properties'], [
            Property.parse('margin: 10px;')
        ])

        response = KeyframeProperties.parse('to { padding: 0 5px; }')
        self.assertEqual(response['selector'], 100.)
        self.assertEqual(response['properties'], [

# Path: css2video/constants.py
# class RuleType(object):
#     """Class to define constants for rule types"""
# 
#     style = 'style'
#     keyframes = 'keyframes'
# 
# Path: css2video/parsers/rule.py
# class StyleParseException(Exception):
# class Style(BaseParser):
# class KeyframePropertiesParseException(Exception):
# class KeyframeProperties(BaseParser):
# class KeyframesParseException(Exception):
# class Keyframes(BaseParser):
# class RuleParseException(Exception):
# class Rule(object):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def grammar(cls):
#     def parse_action(cls, tokens):
#     def parser(cls):


# Path: tests/parsers/rule/test_keyframe.py
import unittest
from css2video.constants import RuleType
from css2video.parsers.rule import (
    Property, KeyframeProperties, KeyframePropertiesParseException,
    Keyframes, KeyframesParseException
)




class TestCase(unittest.TestCase):

    def test_keyframe_properties_parser(self):
        response = KeyframeProperties.parse('from { margin: 10px; }')
        self.assertEqual(response['selector'], 0.)
        self.assertEqual(response['properties'], [
            Property.parse('margin: 10px;')
        ])

        response = KeyframeProperties.parse('to { padding: 0 5px; }')
        self.assertEqual(response['selector'], 100.)
        self.assertEqual(response['properties'], [

            Property.parse('padding: 0 5px;')