diff --git a/test.py b/doxygenTests.py similarity index 87% rename from test.py rename to doxygenTests.py index 26e401a48..311eefa7f 100755 --- a/test.py +++ b/doxygenTests.py @@ -22,7 +22,7 @@ import unittest import os import sys -from .doxygen import DoxyfileParse +from doxygen import DoxyfileParse class TestParser(unittest.TestCase): @@ -53,6 +53,14 @@ INPUT = test.h text = """@INCLUDE=recursive_include_test.cfg""" self.assertRaises(Exception, DoxyfileParse, text, self.test_config_dir) + def test_bytes_parse(self): + """Parsing bytes instead of txt should blow up.""" + text = b""" +# comment +INPUT = test.h +""" + self.assertRaises(AttributeError, DoxyfileParse, text, self.test_config_dir) + if __name__ == "__main__": unittest.main()