Skip to content

Commit

Permalink
Fix unit tests for test_only_ld_linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Apr 18, 2020
1 parent 7c03bef commit 7bc7c99
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/unit/test_elfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,16 @@ def test_find_symbols(self):
# THEN
assert symbols == [("foo-lib", "foo-lib")]

def test_only_ld_linux(self):
@pytest.mark.parametrize('ld_name', ['ld-linux', 'ld64.so.2', 'ld64.so.1'])
def test_only_ld_linux(self, ld_name):
# GIVEN
elf = Mock()
verneed = Mock()
verneed.configure_mock(name="ld-linux")
verneed.configure_mock(name=ld_name)
veraux = Mock()
veraux.configure_mock(name="foo-lib")
elf.get_section_by_name.return_value.iter_versions.return_value = (
(verneed, []),
(verneed, [veraux]),
)

# WHEN
Expand Down

0 comments on commit 7bc7c99

Please sign in to comment.