# Path: css2video/outputters/property.py
# def output_property(property_dict):
#     '''Returns the property as a string'''
#     value = output_value(property_dict['property_value'])
#     return '{name}: {value};'.format(
#         name=property_dict['property_name'], value=value)
# 
# Path: css2video/outputters/rule.py
# def output_rule(rule_dict):
#     '''Returns the rule as a string'''
#     type = rule_dict.get('type')
# 
#     if type is None:
#         raise MissingRuleType()
#     if type == 'style':
#         properties = '\n\t'.join(
#             [output_property(p) for p in rule_dict.get('properties', [])])
#         return (
#             '%s {\n'
#             '\t%s\n'
#             '}'
#         ) % (rule_dict['selector'], properties)
#     if type == 'keyframes':
#         keyframe_properties = '\n'.join([
#             _output_keyframe_properties(p)
#             for p in rule_dict.get('keyframes', [])
#         ])
#         return (
#             '@keyframes %s {\n'
#             '%s\n'
#             '}'
#         ) % (rule_dict['name'], keyframe_properties)
# 
# Path: css2video/outputters/stylesheet.py
# def output_stylesheet(stylesheet_dict):
#     '''Returns the stylesheet as a string'''
#     return '\n'.join(
#         [output_rule(rule) for rule in stylesheet_dict.get('rules', []) if rule['type'] == 'style'])
# 
# Path: css2video/outputters/value.py
# def output_value(value_dict):
#     '''Return the value as a string'''
#     type = value_dict.get('type')
# 
#     if type is None:
#         raise MissingValueType()
#     if type == 'number':
#         return '{value}'.format(**value_dict)
#     if type == 'length':
#         return '{value}{unit}'.format(**value_dict)
#     if type == 'percentage':
#         return '{value}%'.format(**value_dict)
#     if type == 'time':
#         return '{value}s'.format(**value_dict)
#     if type == 'color':
#         return 'rgba({red}, {green}, {blue}, {alpha})'.format(**value_dict)
#     if type == 'text':
#         return '{value}'.format(**value_dict)
#     if type == 'url':
#         return '{value}'.format(**value_dict)
#     if type == 'function':
#         args = ' '.join([output_value(arg) for arg in value_dict['args']])
#         return '{name}({args})'.format(name=value_dict['name'], args=args)
#     if type == 'array':
#         args = ' '.join([output_value(arg) for arg in value_dict['values']])
#         return '{args}'.format(args=args)


import unittest
from css2video.outputters import output_property
from css2video.outputters import output_rule
from css2video.outputters import output_stylesheet
from css2video.outputters import output_value
                    },
                    {
                        'type': 'time',
                        'value': 2
                    },
                ]
            },
            '20px rgba(255, 255, 255, 1)': {
                'type': 'array',
                'values': [
                    {
                        'type': 'length',
                        'value': 20,
                        'unit': 'px'
                    },
                    {
                        'type': 'color',
                        'red': 255,
                        'green': 255,
                        'blue': 255,
                        'alpha': 1
                    }
                ]
            },
            '"http://www.google.com"': {
                'type': 'url',
                'value': '"http://www.google.com"'
            }
        }
        for expected_value_string, value_dict in value_data.items():

# Path: css2video/outputters/property.py
# def output_property(property_dict):
#     '''Returns the property as a string'''
#     value = output_value(property_dict['property_value'])
#     return '{name}: {value};'.format(
#         name=property_dict['property_name'], value=value)
# 
# Path: css2video/outputters/rule.py
# def output_rule(rule_dict):
#     '''Returns the rule as a string'''
#     type = rule_dict.get('type')
# 
#     if type is None:
#         raise MissingRuleType()
#     if type == 'style':
#         properties = '\n\t'.join(
#             [output_property(p) for p in rule_dict.get('properties', [])])
#         return (
#             '%s {\n'
#             '\t%s\n'
#             '}'
#         ) % (rule_dict['selector'], properties)
#     if type == 'keyframes':
#         keyframe_properties = '\n'.join([
#             _output_keyframe_properties(p)
#             for p in rule_dict.get('keyframes', [])
#         ])
#         return (
#             '@keyframes %s {\n'
#             '%s\n'
#             '}'
#         ) % (rule_dict['name'], keyframe_properties)
# 
# Path: css2video/outputters/stylesheet.py
# def output_stylesheet(stylesheet_dict):
#     '''Returns the stylesheet as a string'''
#     return '\n'.join(
#         [output_rule(rule) for rule in stylesheet_dict.get('rules', []) if rule['type'] == 'style'])
# 
# Path: css2video/outputters/value.py
# def output_value(value_dict):
#     '''Return the value as a string'''
#     type = value_dict.get('type')
# 
#     if type is None:
#         raise MissingValueType()
#     if type == 'number':
#         return '{value}'.format(**value_dict)
#     if type == 'length':
#         return '{value}{unit}'.format(**value_dict)
#     if type == 'percentage':
#         return '{value}%'.format(**value_dict)
#     if type == 'time':
#         return '{value}s'.format(**value_dict)
#     if type == 'color':
#         return 'rgba({red}, {green}, {blue}, {alpha})'.format(**value_dict)
#     if type == 'text':
#         return '{value}'.format(**value_dict)
#     if type == 'url':
#         return '{value}'.format(**value_dict)
#     if type == 'function':
#         args = ' '.join([output_value(arg) for arg in value_dict['args']])
#         return '{name}({args})'.format(name=value_dict['name'], args=args)
#     if type == 'array':
#         args = ' '.join([output_value(arg) for arg in value_dict['values']])
#         return '{args}'.format(args=args)


# Path: tests/test_outputters.py
import unittest
from css2video.outputters import output_property
from css2video.outputters import output_rule
from css2video.outputters import output_stylesheet
from css2video.outputters import output_value

                    },
                    {
                        'type': 'time',
                        'value': 2
                    },
                ]
            },
            '20px rgba(255, 255, 255, 1)': {
                'type': 'array',
                'values': [
                    {
                        'type': 'length',
                        'value': 20,
                        'unit': 'px'
                    },
                    {
                        'type': 'color',
                        'red': 255,
                        'green': 255,
                        'blue': 255,
                        'alpha': 1
                    }
                ]
            },
            '"http://www.google.com"': {
                'type': 'url',
                'value': '"http://www.google.com"'
            }
        }
        for expected_value_string, value_dict in value_data.items():

            value_string = output_value(value_dict)