From b153ef66b62e8a85716e3d0975f12222f45257e5 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Tue, 9 Jan 2018 06:56:24 -0800 Subject: [PATCH] Some whitespace fixes --- elftools/elf/elffile.py | 1 - test/test_dwarf_range_lists.py | 2 ++ test/test_gnuversions.py | 1 + test/test_mips_support.py | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/elftools/elf/elffile.py b/elftools/elf/elffile.py index 815e941..354088b 100644 --- a/elftools/elf/elffile.py +++ b/elftools/elf/elffile.py @@ -207,7 +207,6 @@ class ELFFile(object): debug_ranges_sec=debug_sections[debug_ranges_sec_name], debug_line_sec=debug_sections[debug_line_sec_name]) - def get_machine_arch(self): """ Return the machine architecture, as detected from the ELF header. Not all architectures are supported at the moment. diff --git a/test/test_dwarf_range_lists.py b/test/test_dwarf_range_lists.py index cde2d8b..da76507 100644 --- a/test/test_dwarf_range_lists.py +++ b/test/test_dwarf_range_lists.py @@ -9,6 +9,7 @@ import unittest from elftools.elf.elffile import ELFFile + class TestRangeLists(unittest.TestCase): # Test the absence of .debug_ranges section def test_range_list_absence(self): @@ -26,5 +27,6 @@ class TestRangeLists(unittest.TestCase): self.assertTrue(elffile.has_dwarf_info()) self.assertIsNotNone(elffile.get_dwarf_info().range_lists()) + if __name__ == '__main__': unittest.main() diff --git a/test/test_gnuversions.py b/test/test_gnuversions.py index 5b6fc1c..54b047c 100644 --- a/test/test_gnuversions.py +++ b/test/test_gnuversions.py @@ -151,5 +151,6 @@ class TestSymbolVersioning(unittest.TestCase): verdaux_iter, ref_verdef['verdaux']): self.assertEqual(verdaux.name, ref_verdaux['name']) + if __name__ == '__main__': unittest.main() diff --git a/test/test_mips_support.py b/test/test_mips_support.py index 9430ce4..0cd3720 100644 --- a/test/test_mips_support.py +++ b/test/test_mips_support.py @@ -9,6 +9,7 @@ import os from elftools.elf.elffile import ELFFile + class TestMIPSSupport(unittest.TestCase): def test_hello(self): with open(os.path.join('test', 'testfiles_for_unittests', @@ -21,5 +22,6 @@ class TestMIPSSupport(unittest.TestCase): self.assertEqual(elf.num_sections(), 25) self.assertEqual(elf.num_segments(), 0) + if __name__ == '__main__': unittest.main() -- 2.30.2