# Path: jinja2schema/model.py
# class Variable(object):
#     """A base variable class.
# 
#     .. attribute:: linenos
# 
#         An ordered list of line numbers on which the variable occurs.
# 
#     .. attribute:: label
# 
#         A name of the variable in template.
# 
#     .. attribute:: constant
# 
#         Is true if the variable is defined using a ``{% set %}`` tag before it
#         occurs within any other statement in the template, or inferred from
#         a constant Jinja2 node.
# 
#     .. attribute:: may_be_defined
# 
#         Is true if the variable would be defined (using a ``{% set %}`` expression) if it's missing
#         from the template context. For example, ``x`` is ``may_be_defined`` in the following template::
# 
#             {% if x is undefined %} {% set x = 1 %} {% endif %}
# 
#     .. attribute:: used_with_default
# 
#         Is true if the variable occurs only within the ``default`` filter.
# 
#     .. attribute:: checked_as_undefined
# 
#         Is true if the variable occurs within ``{% if %}`` block which condition checks
#         if the variable is undefined.
# 
#     .. attribute:: checked_as_defined
# 
#         Is true if the variable occurs within ``{% if %}`` block which condition checks
#         if the variable is defined.
# 
#     .. attribute:: value
# 
#         Value of the variable in template. Set by default filter or assignment.
#     """
#     def __init__(self, label=None, linenos=None, constant=False,
#                  may_be_defined=False, used_with_default=False,
#                  checked_as_undefined=False, checked_as_defined=False,
#                  value=None, order_nr=None):
#         self.label = label
#         self.linenos = linenos if linenos is not None else []
#         self.constant = constant
#         self.may_be_defined = may_be_defined
#         self.used_with_default = used_with_default
#         self.checked_as_undefined = checked_as_undefined
#         self.checked_as_defined = checked_as_defined
#         self.value = value
#         self.order_nr = order_nr
# 
#     def clone(self):
#         cls = type(self)
#         return cls(**self.__dict__)
# 
#     @classmethod
#     def _get_kwargs_from_ast(cls, ast):
#         return {
#             'linenos': [ast.lineno],
#             'label': ast.name if isinstance(ast, nodes.Name) else None,
#             'value': ast.value if hasattr(ast, 'value') else None,
#         }
# 
#     @classmethod
#     def from_ast(cls, ast, **kwargs):
#         """Constructs a variable using information from ``ast`` (such as label and line numbers).
# 
#         :param ast: AST node
#         :type ast: :class:`jinja2.nodes.Node`
#         """
#         for k, v in list(kwargs.items()):
#             if v is None:
#                 del kwargs[k]
#         kwargs = dict(cls._get_kwargs_from_ast(ast), **kwargs)
#         return cls(**kwargs)
# 
#     @property
#     def required(self):
#         return not any([self.may_be_defined, self.used_with_default,
#                         self.checked_as_defined, self.checked_as_undefined])
# 
#     def __eq__(self, other):
#         return (
#             type(self) is type(other) and
#             self.linenos == other.linenos and
#             self.label == other.label and
#             self.constant == other.constant and
#             self.used_with_default == other.used_with_default and
#             self.checked_as_undefined == other.checked_as_undefined and
#             self.checked_as_defined == other.checked_as_defined and
#             self.required == other.required and
#             self.value == other.value
#         )
# 
#     def __ne__(self, other):
#         return not self.__eq__(other)
# 
# Path: jinja2schema/util.py
# def _debug_repr(var):
#     rv = []
#     if isinstance(var, (Dictionary, Tuple, List)):
#         if isinstance(var, Dictionary):
#             rv.append('Dictionary({}, {{'.format(_format_attrs(var)))
#             content = []
#             for key, value in sorted(var.iteritems()):
#                 key_repr = key + ': '
#                 value_repr = _debug_repr(value)
#                 content.append(key_repr + value_repr[0])
#                 content.extend(_indent(value_repr[1:], spaces=len(key_repr)))
#             rv.extend(_indent(content, spaces=4))
#             rv.append('})')
#         elif isinstance(var, Tuple):
#             rv.append('Tuple({},'.format(_format_attrs(var)))
#             for el in var.items:
#                 el_repr = _debug_repr(el)
#                 el_repr[-1] += ','
#                 rv.extend(_indent(el_repr, spaces=4))
#             rv[-1] = rv[-1][:-1]  # remove comma from the last tuple item
#             rv.append(')')
#         elif isinstance(var, List):
#             rv.append('List({},'.format(_format_attrs(var)))
#             rv.extend(_indent(_debug_repr(var.item), spaces=4))
#             rv.append(')')
#     elif isinstance(var, Scalar):
#         rv = ['{}({})'.format(var.__class__.__name__, _format_attrs(var))]
#     elif isinstance(var, Unknown):
#         rv = ['Unknown({})'.format(_format_attrs(var))]
#     return rv


import difflib
from jinja2schema.model import Variable
from jinja2schema.util import _debug_repr
# coding: utf-8



def pytest_assertrepr_compare(op, left, right):
    if isinstance(left, Variable) and isinstance(right, Variable) and op == '==':
        left = _debug_repr(left)

# Path: jinja2schema/model.py
# class Variable(object):
#     """A base variable class.
# 
#     .. attribute:: linenos
# 
#         An ordered list of line numbers on which the variable occurs.
# 
#     .. attribute:: label
# 
#         A name of the variable in template.
# 
#     .. attribute:: constant
# 
#         Is true if the variable is defined using a ``{% set %}`` tag before it
#         occurs within any other statement in the template, or inferred from
#         a constant Jinja2 node.
# 
#     .. attribute:: may_be_defined
# 
#         Is true if the variable would be defined (using a ``{% set %}`` expression) if it's missing
#         from the template context. For example, ``x`` is ``may_be_defined`` in the following template::
# 
#             {% if x is undefined %} {% set x = 1 %} {% endif %}
# 
#     .. attribute:: used_with_default
# 
#         Is true if the variable occurs only within the ``default`` filter.
# 
#     .. attribute:: checked_as_undefined
# 
#         Is true if the variable occurs within ``{% if %}`` block which condition checks
#         if the variable is undefined.
# 
#     .. attribute:: checked_as_defined
# 
#         Is true if the variable occurs within ``{% if %}`` block which condition checks
#         if the variable is defined.
# 
#     .. attribute:: value
# 
#         Value of the variable in template. Set by default filter or assignment.
#     """
#     def __init__(self, label=None, linenos=None, constant=False,
#                  may_be_defined=False, used_with_default=False,
#                  checked_as_undefined=False, checked_as_defined=False,
#                  value=None, order_nr=None):
#         self.label = label
#         self.linenos = linenos if linenos is not None else []
#         self.constant = constant
#         self.may_be_defined = may_be_defined
#         self.used_with_default = used_with_default
#         self.checked_as_undefined = checked_as_undefined
#         self.checked_as_defined = checked_as_defined
#         self.value = value
#         self.order_nr = order_nr
# 
#     def clone(self):
#         cls = type(self)
#         return cls(**self.__dict__)
# 
#     @classmethod
#     def _get_kwargs_from_ast(cls, ast):
#         return {
#             'linenos': [ast.lineno],
#             'label': ast.name if isinstance(ast, nodes.Name) else None,
#             'value': ast.value if hasattr(ast, 'value') else None,
#         }
# 
#     @classmethod
#     def from_ast(cls, ast, **kwargs):
#         """Constructs a variable using information from ``ast`` (such as label and line numbers).
# 
#         :param ast: AST node
#         :type ast: :class:`jinja2.nodes.Node`
#         """
#         for k, v in list(kwargs.items()):
#             if v is None:
#                 del kwargs[k]
#         kwargs = dict(cls._get_kwargs_from_ast(ast), **kwargs)
#         return cls(**kwargs)
# 
#     @property
#     def required(self):
#         return not any([self.may_be_defined, self.used_with_default,
#                         self.checked_as_defined, self.checked_as_undefined])
# 
#     def __eq__(self, other):
#         return (
#             type(self) is type(other) and
#             self.linenos == other.linenos and
#             self.label == other.label and
#             self.constant == other.constant and
#             self.used_with_default == other.used_with_default and
#             self.checked_as_undefined == other.checked_as_undefined and
#             self.checked_as_defined == other.checked_as_defined and
#             self.required == other.required and
#             self.value == other.value
#         )
# 
#     def __ne__(self, other):
#         return not self.__eq__(other)
# 
# Path: jinja2schema/util.py
# def _debug_repr(var):
#     rv = []
#     if isinstance(var, (Dictionary, Tuple, List)):
#         if isinstance(var, Dictionary):
#             rv.append('Dictionary({}, {{'.format(_format_attrs(var)))
#             content = []
#             for key, value in sorted(var.iteritems()):
#                 key_repr = key + ': '
#                 value_repr = _debug_repr(value)
#                 content.append(key_repr + value_repr[0])
#                 content.extend(_indent(value_repr[1:], spaces=len(key_repr)))
#             rv.extend(_indent(content, spaces=4))
#             rv.append('})')
#         elif isinstance(var, Tuple):
#             rv.append('Tuple({},'.format(_format_attrs(var)))
#             for el in var.items:
#                 el_repr = _debug_repr(el)
#                 el_repr[-1] += ','
#                 rv.extend(_indent(el_repr, spaces=4))
#             rv[-1] = rv[-1][:-1]  # remove comma from the last tuple item
#             rv.append(')')
#         elif isinstance(var, List):
#             rv.append('List({},'.format(_format_attrs(var)))
#             rv.extend(_indent(_debug_repr(var.item), spaces=4))
#             rv.append(')')
#     elif isinstance(var, Scalar):
#         rv = ['{}({})'.format(var.__class__.__name__, _format_attrs(var))]
#     elif isinstance(var, Unknown):
#         rv = ['Unknown({})'.format(_format_attrs(var))]
#     return rv


# Path: tests/conftest.py
import difflib
from jinja2schema.model import Variable
from jinja2schema.util import _debug_repr

# coding: utf-8



def pytest_assertrepr_compare(op, left, right):
    if isinstance(left, Variable) and isinstance(right, Variable) and op == '==':
        left = _debug_repr(left)

        right = _debug_repr(right)