# Path: crmsh/parse.py
# def parse(self, cmd):
#     "Called by do_parse(). Raises ParseError if parsing fails."
#     raise NotImplementedError
# 
# Path: crmsh/utils.py
# def lines2cli(s):
#     '''
#     Convert a string into a list of lines. Replace continuation
#     characters. Strip white space, left and right. Drop empty lines.
#     '''
#     cl = []
#     l = s.split('\n')
#     cum = []
#     for p in l:
#         p = p.strip()
#         if p.endswith('\\'):
#             p = p.rstrip('\\')
#             cum.append(p)
#         else:
#             cum.append(p)
#             cl.append(''.join(cum).strip())
#             cum = []
#     if cum:  # in case s ends with backslash
#         cl.append(''.join(cum))
#     return [x for x in cl if x]
# 
# Path: crmsh/xmlutil.py
# def xml_tostring(*args, **kwargs):
#     """
#     Python 2/3 conversion utility:
#     etree.tostring returns a bytestring, but
#     we need actual Python strings.
#     """
#     return etree.tostring(*args, **kwargs).decode('utf-8')


    from unittest import mock
from builtins import zip
from crmsh import parse
from crmsh.utils import lines2cli
from crmsh.xmlutil import xml_tostring
from lxml import etree
    import mock
import unittest
import shlex
from __future__ import print_function
from __future__ import unicode_literals
# Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com>
# See COPYING for license information.
#
# unit tests for parse.py
try:
except ImportError:



def test_score_to_kind():

# Path: crmsh/parse.py
# def parse(self, cmd):
#     "Called by do_parse(). Raises ParseError if parsing fails."
#     raise NotImplementedError
# 
# Path: crmsh/utils.py
# def lines2cli(s):
#     '''
#     Convert a string into a list of lines. Replace continuation
#     characters. Strip white space, left and right. Drop empty lines.
#     '''
#     cl = []
#     l = s.split('\n')
#     cum = []
#     for p in l:
#         p = p.strip()
#         if p.endswith('\\'):
#             p = p.rstrip('\\')
#             cum.append(p)
#         else:
#             cum.append(p)
#             cl.append(''.join(cum).strip())
#             cum = []
#     if cum:  # in case s ends with backslash
#         cl.append(''.join(cum))
#     return [x for x in cl if x]
# 
# Path: crmsh/xmlutil.py
# def xml_tostring(*args, **kwargs):
#     """
#     Python 2/3 conversion utility:
#     etree.tostring returns a bytestring, but
#     we need actual Python strings.
#     """
#     return etree.tostring(*args, **kwargs).decode('utf-8')


# Path: test/unittests/test_parse.py
    from unittest import mock
from builtins import zip
from crmsh import parse
from crmsh.utils import lines2cli
from crmsh.xmlutil import xml_tostring
from lxml import etree
    import mock
import unittest
import shlex

from __future__ import print_function
from __future__ import unicode_literals
# Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com>
# See COPYING for license information.
#
# unit tests for parse.py
try:
except ImportError:



def test_score_to_kind():

    assert parse.score_to_kind("0") == "Optional"