def test_not_elf(self, elffile_mock, open_mock): # GIVEN elffile_mock.side_effect = ELFError # WHEN result = elf_file_filter(["file1.notelf", "file2.notelf"]) # THEN assert len(list(result)) == 0
def test_some_py_files(self, elffile_mock, open_mock): result = elf_file_filter(["file1.py", "file2.so", "file3.py"]) assert len(list(result)) == 1
def test_filter(self, elffile_mock, open_mock): result = elf_file_filter(["file1.so", "file2.so"]) assert len(list(result)) == 2