On OS X /var is a symlink to /private/var so the check:
new_name = vim.eval('tempname()')
vim.current.buffer.name = new_name
eq(vim.current.buffer.name, new_name)
fails with:
AssertionError: '/private/var/folders/07/jtkf72yn4_587wv8zc7ntg6h0000gn/T/nvim8XLj27/0' != '/var/folders/07/jtkf72yn4_587wv8zc7ntg6h0000gn/T/nvim8XLj27/0'
Although the file was name was changed the test fails because the symlink path is being used in one case and the full path in the other case.