# Path: easy_karabiner/util.py
# def read_python_file(pypath):
# def get_checksum(s):
# def escape_string(s):
# def encode_with_utf8(o):
# def is_hex(s):
# def is_list_or_tuple(obj):
# def split_ignore_quote(s):
# def remove_all_space(s):
# def is_xml_element_equal(node1, node2):
# def is_xml_tree_equal(tree1, tree2, ignore_tags=tuple()):
# def assert_xml_equal(xml_tree1, xml_tree2, ignore_tags=tuple()):
# def print_message(msg, color=None, err=False):
# def print_error(msg, print_stack=False):
# def print_warning(msg):
# def print_info(msg):


from easy_karabiner import util
from easy_karabiner.definition import *
# -*- coding: utf-8 -*-


def test_appdef():
    d = App('BILIBILI', 'com.typcn.Bilibili')
    s = '''
        <appdef>
          <appname>BILIBILI</appname>
          <equal>com.typcn.Bilibili</equal>
        </appdef>'''

# Path: easy_karabiner/util.py
# def read_python_file(pypath):
# def get_checksum(s):
# def escape_string(s):
# def encode_with_utf8(o):
# def is_hex(s):
# def is_list_or_tuple(obj):
# def split_ignore_quote(s):
# def remove_all_space(s):
# def is_xml_element_equal(node1, node2):
# def is_xml_tree_equal(tree1, tree2, ignore_tags=tuple()):
# def assert_xml_equal(xml_tree1, xml_tree2, ignore_tags=tuple()):
# def print_message(msg, color=None, err=False):
# def print_error(msg, print_stack=False):
# def print_warning(msg):
# def print_info(msg):


# Path: tests/test_definition.py
from easy_karabiner import util
from easy_karabiner.definition import *

# -*- coding: utf-8 -*-


def test_appdef():
    d = App('BILIBILI', 'com.typcn.Bilibili')
    s = '''
        <appdef>
          <appname>BILIBILI</appname>
          <equal>com.typcn.Bilibili</equal>
        </appdef>'''

    util.assert_xml_equal(d, s)