From c4e1068895247e2323ab67257990bdf3e8821ed3 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 23 Oct 2023 14:06:04 -0700 Subject: [PATCH] move print statements --- tests/test_xml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_xml.py b/tests/test_xml.py index 4a685a40..bbe26939 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -13,9 +13,6 @@ except: THIS_DIR = os.path.dirname(os.path.abspath(__file__)) XMLTODICT_0_13_0_OR_HIGHER = version.parse(xmltodict.__version__) >= version.parse('0.13.0') -if not XMLTODICT_0_13_0_OR_HIGHER: - print('\n### Using older version of xmltodict library. Testing without comment support. ###\n') - class MyTests(unittest.TestCase): @@ -80,6 +77,7 @@ class MyTests(unittest.TestCase): if XMLTODICT_0_13_0_OR_HIGHER: self.assertEqual(jc.parsers.xml.parse(self.generic_xml_nmap, quiet=True), self.generic_xml_nmap_json) else: + print('\n### Using older version of xmltodict library. Testing without comment support. ### ... ') self.assertEqual(jc.parsers.xml.parse(self.generic_xml_nmap, quiet=True), self.generic_xml_nmap_nocomment_json) def test_xml_nmap_r(self): @@ -89,6 +87,7 @@ class MyTests(unittest.TestCase): if XMLTODICT_0_13_0_OR_HIGHER: self.assertEqual(jc.parsers.xml.parse(self.generic_xml_nmap, raw=True, quiet=True), self.generic_xml_nmap_r_json) else: + print('\n### Using older version of xmltodict library. Testing without comment support. ### ... ') self.assertEqual(jc.parsers.xml.parse(self.generic_xml_nmap, raw=True, quiet=True), self.generic_xml_nmap_r_nocomment_json)