<commit_before>#
# Copyright (C) 2011, 2012 <NAME> <ssato at redhat.com>
#
import jinja2_cui.render as R
import unittest


class Test_functions(unittest.TestCase):

    def test_is_dict(self):
        self.assertTrue(R.is_dict({}))
        self.assertTrue(R.is_dict({"a": 1}))
        self.assertFalse(R.is_dict([]))
        self.assertFalse(R.is_dict(None))

    def test_is_iterable(self):
        self.assertTrue(R.is_iterable([1, 2]))
        self.assertTrue(R.is_iterable((1, 2)))
        self.assertTrue(R.is_iterable((x for x in range(10))))
        self.assertFalse(R.is_iterable({}))
        self.assertFalse(R.is_iterable(None))


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(Test_functions))
    return suite


# vim:sw=4:ts=4:et:<commit_msg>made it runnable w/o nose<commit_after>#
# Copyright (C) 2011, 2012 <NAME> <ssato at redhat.com>
#
import jinja2_cui.render as R
import unittest


class Test_functions(unittest.TestCase):

    def test_is_dict(self):
        self.assertTrue(R.is_dict({}))
        self.assertTrue(R.is_dict({"a": 1}))
        self.assertFalse(R.is_dict([]))
        self.assertFalse(R.is_dict(None))

    def test_is_iterable(self):
        self.assertTrue(R.is_iterable([1, 2]))
        self.assertTrue(R.is_iterable((1, 2)))
        self.assertTrue(R.is_iterable((x for x in range(10))))
        self.assertFalse(R.is_iterable({}))
        self.assertFalse(R.is_iterable(None))


if __name__ == '__main__':
    unittest.main()

# vim:sw=4:ts=4:et:
{'fraction_non_alphanumeric': 0.15495732107682206, 'fraction_numerical': 0.023637557452396585, 'mean_word_length': 3.5357142857142856, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '4409376', 'n_tokens_mistral': 587, 'n_tokens_neox': 561, 'n_words': 90}