Remove some unconditional printouts in unit tests
authorEli Bendersky <eliben@gmail.com>
Mon, 9 Mar 2020 12:42:34 +0000 (05:42 -0700)
committerEli Bendersky <eliben@gmail.com>
Mon, 9 Mar 2020 12:42:34 +0000 (05:42 -0700)
test/test_dwarf_constisntloc.py
test/test_dwarf_locexpr_on_gnucall.py

index b97ef393b200de8f345ff7682882e2c782aacad7..e98a0ca72b6e539d2685904677d1266dfadbfe44 100644 (file)
@@ -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()
index ba24da513ebee57bc060c6af925dff7749fbd0c9..29d57a7915ed11d6c9aa79da0fdd799c8d7c14b3 100644 (file)
@@ -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()