<commit_before>import unittest
from click.testing import CliRunner

from scuevals_api.cmd import cli


class CmdsTestCase(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.runner = CliRunner()

        def cli_run(self, *cmds):
            return self.runner.invoke(cli, cmds)

        cls.cli_run = cli_run

    def test_initdb(self):
        result = self.cli_run('initdb')
        self.assertEqual(0, result.exit_code)<commit_msg>Add detailed error for CLI test failure<commit_after>import unittest
from click.testing import CliRunner

from scuevals_api.cmd import cli


class CmdsTestCase(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.runner = CliRunner()

        def cli_run(self, *cmds):
            return self.runner.invoke(cli, cmds)

        cls.cli_run = cli_run

    def test_initdb(self):
        result = self.cli_run('initdb')
        self.assertEqual(0, result.exit_code, msg=result.output)
{'fraction_non_alphanumeric': 0.09261186264308012, 'fraction_numerical': 0.002081165452653486, 'mean_word_length': 3.059071729957806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2178184', 'n_tokens_mistral': 318, 'n_tokens_neox': 301, 'n_words': 68}