From 5d1bf3c0bef84b2a48f6106a07f968b74557a44e Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Sun, 31 Jul 2022 17:12:23 -0600 Subject: [PATCH] sconsDoxy: Update doxygen testcase and rename Signed-off-by: Mats Wichmann --- test.py => doxygenTests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) rename test.py => doxygenTests.py (87%) 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()