# Path: alot/helper.py
# def split_commandline(s):
# def split_commandstring(cmdstring):
# def string_sanitize(string, tab_width=8):
# def string_decode(string, enc='ascii'):
# def shorten(string, maxlen):
# def shorten_author_string(authors_string, maxlength):
# def pretty_datetime(d):
# def call_cmd(cmdlist, stdin=None):
# async def call_cmd_async(cmdlist, stdin=None, env=None):
# def guess_mimetype(blob):
# def guess_encoding(blob):
# def try_decode(blob):
# def libmagic_version_at_least(version):
# def mimewrap(path, filename=None, ctype=None):
# def shell_quote(text):
# def humanize_size(size):
# def parse_mailcap_nametemplate(tmplate='%s'):
# def parse_mailto(mailto_str):
# def mailto_to_envelope(mailto_str):
# def RFC3156_canonicalize(text):
# def get_xdg_env(env_name, fallback):
# def get_notmuch_config_path():


import datetime
import errno
import os
import random
import unittest
from unittest import mock
from alot import helper
from . import utilities
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Test suite for alot.helper module."""




# Descriptive names for tests often violate PEP8. That's not an issue, users
# aren't meant to call these functions.
# pylint: disable=invalid-name

# They're tests, only add docstrings when it makes sense
# pylint: disable=missing-docstring


class TestHelperShortenAuthorString(unittest.TestCase):

    authors = 'King Kong, Mucho Muchacho, Jaime Huerta, Flash Gordon'

    def test_high_maxlength_keeps_string_intact(self):

# Path: alot/helper.py
# def split_commandline(s):
# def split_commandstring(cmdstring):
# def string_sanitize(string, tab_width=8):
# def string_decode(string, enc='ascii'):
# def shorten(string, maxlen):
# def shorten_author_string(authors_string, maxlength):
# def pretty_datetime(d):
# def call_cmd(cmdlist, stdin=None):
# async def call_cmd_async(cmdlist, stdin=None, env=None):
# def guess_mimetype(blob):
# def guess_encoding(blob):
# def try_decode(blob):
# def libmagic_version_at_least(version):
# def mimewrap(path, filename=None, ctype=None):
# def shell_quote(text):
# def humanize_size(size):
# def parse_mailcap_nametemplate(tmplate='%s'):
# def parse_mailto(mailto_str):
# def mailto_to_envelope(mailto_str):
# def RFC3156_canonicalize(text):
# def get_xdg_env(env_name, fallback):
# def get_notmuch_config_path():


# Path: tests/test_helper.py
import datetime
import errno
import os
import random
import unittest
from unittest import mock
from alot import helper
from . import utilities

# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Test suite for alot.helper module."""




# Descriptive names for tests often violate PEP8. That's not an issue, users
# aren't meant to call these functions.
# pylint: disable=invalid-name

# They're tests, only add docstrings when it makes sense
# pylint: disable=missing-docstring


class TestHelperShortenAuthorString(unittest.TestCase):

    authors = 'King Kong, Mucho Muchacho, Jaime Huerta, Flash Gordon'

    def test_high_maxlength_keeps_string_intact(self):

        short = helper.shorten_author_string(self.authors, 60)