def test_line_count(self):
        """All the files in the test folder have two lines of code and some
        comments.

        """
        self.assertEqual(line_counts,
                         {level_up.language(f): level_up.line_count(f)
                            for f in test_files[1:]})
    def test_language(self):
        """Tests that the language function correctly deduces the language
        of a source code file from it's extension, or raises a LanguageError
        if the language is unsupported.

        """
        for f in test_files[0]:    # First item is a folder
            self.assertRaises(level_up.LanguageError, level_up.language, f)

        self.assertEqual(set([level_up.language(f) for f in test_files[1:]]),
                         set(su_langs))