def METHOD_NAME(self):
    self.popen_result.stdout = to_bytes(u"fooébar", errors='surrogate_escape')
    self.popen_result.stderr = to_bytes(u"dummyédata")
    self.popen_result.returncode = 1
    with pytest.raises(AnsibleError) as e:
        self.inventory_module.parse(self.inventory, self.loader, '/foo/bar/foobar.py')
    assert e.value.message == to_native("Inventory script (/foo/bar/foobar.py) had an execution error: "
                                        "dummyédata\n ")