dsoprea / PySvn

Lightweight Subversion library for Python.
GNU General Public License v2.0
217 stars 145 forks source link

test_info fails on macos #161

Open idbrii opened 4 years ago

idbrii commented 4 years ago

test_info has this assert:

            self.assertEqual(
                info['entry_path'],
                '.')

which causes this failure on macOS 10.15.7:

|| AssertionError: '/var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmp9yvxsh56' != '.'
|| - /var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmp9yvxsh56
|| + .

The reason is clearer when using absolute paths:

            self.assertEqual(
                os.path.realpath(os.path.abspath(info['entry_path'])),
                os.path.realpath(os.path.abspath('.')))
|| AssertionError: 'file:///private/var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmplwu2veti' != 'file:///var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmplwu2veti'
|| - file:///private/var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmplwu2veti
|| ?        --------
|| + file:///var/folders/nn/60mn72f90kj5f2pf9x1sx9s00000gn/T/tmplwu2veti

Not sure if that private folder a macos-specific thing. I'm not entirely sure what's wrong and causing different paths or how to prevent it.