From: Eli Bendersky Date: Mon, 9 Mar 2020 12:42:34 +0000 (-0700) Subject: Remove some unconditional printouts in unit tests X-Git-Tag: v0.27~51 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25a2375cf397f38c347fe52757fa7eebebcbf1e8;p=pyelftools.git Remove some unconditional printouts in unit tests --- diff --git a/test/test_dwarf_constisntloc.py b/test/test_dwarf_constisntloc.py index b97ef39..e98a0ca 100644 --- a/test/test_dwarf_constisntloc.py +++ b/test/test_dwarf_constisntloc.py @@ -17,13 +17,11 @@ from elftools.dwarf.locationlists import LocationParser class TestConstWithData4IsntLocation(unittest.TestCase): def _test_file(self, filename): filepath = os.path.join('test', 'testfiles_for_unittests', filename) - print('Reading %s...' % (filename)) with open(filepath, 'rb') as f: elffile = ELFFile(f) dwarfinfo = elffile.get_dwarf_info() locparser = LocationParser(dwarfinfo.location_lists()) for CU in dwarfinfo.iter_CUs(): - print("Compile unit %s..." % CU.get_top_DIE().attributes['DW_AT_name'].value.decode('utf-8')) ver = CU['version'] for DIE in CU.iter_DIEs(): for key in DIE.attributes: @@ -36,4 +34,4 @@ class TestConstWithData4IsntLocation(unittest.TestCase): self._test_file('pascalenum.o') if __name__ == '__main__': - unittest.main() + unittest.main() diff --git a/test/test_dwarf_locexpr_on_gnucall.py b/test/test_dwarf_locexpr_on_gnucall.py index ba24da5..29d57a7 100644 --- a/test/test_dwarf_locexpr_on_gnucall.py +++ b/test/test_dwarf_locexpr_on_gnucall.py @@ -17,14 +17,11 @@ from elftools.dwarf.locationlists import LocationParser class TestGNUCallAttributesHaveLocation(unittest.TestCase): def _test_file(self, filename): filepath = os.path.join('test', 'testfiles_for_unittests', filename) - print('Reading %s...' % (filename)) with open(filepath, 'rb') as f: elffile = ELFFile(f) dwarfinfo = elffile.get_dwarf_info() for CU in dwarfinfo.iter_CUs(): ver = CU['version'] - print("Compile unit %s..." % CU.get_top_DIE().attributes['DW_AT_name'].value.decode('utf-8')) - for DIE in CU.iter_DIEs(): for key in DIE.attributes: attr = DIE.attributes[key] @@ -36,4 +33,4 @@ class TestGNUCallAttributesHaveLocation(unittest.TestCase): self._test_file('dwarf_gnuops1.o') if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()