def METHOD_NAME(self):
    self.popen_result.returncode = 0
    self.popen_result.stderr = to_bytes("dummyédata")
    self.loader.load.side_effect = TypeError('obj must be string')
    with pytest.raises(AnsibleError) as e:
        self.inventory_module.parse(self.inventory, self.loader, '/foo/bar/foobar.py')
    assert e.value.message == to_native("failed to parse executable inventory script results from "
                                        "/foo/bar/foobar.py: obj must be string\ndummyédata\n")