[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] fix svnrdump_tests.py on Windows with Python 3 (Re: Problems running testsuite on Windows with Python 3)

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Sun, 3 May 2020 03:04:52 +0200

On Sat, May 2, 2020 at 7:37 PM Yasuhito FUTATSUKI <futatuki_at_poem.co.jp> wrote:
>
> On 2020/04/19 3:26, Johan Corveleyn wrote:
>
> > This is the list of tests that still fail (66):
>
> > FAIL: svnrdump_tests.py 1: dump: standard sbox repos
> ...
> > FAIL: svnrdump_tests.py 57: load: invalid svn:date revprop in r1
>
> These failures in svnrdump_tests.py seems to be caused in EOL character
> conversion only for Windows, and by change of map() function return
> value type between Python 2 and 3.
>
> The patch below address to it. This will fix the exceptions in
> fails2.log, however other problems can be found.
> [[[
> Index: subversion/tests/cmdline/svntest/actions.py
> ===================================================================
> --- subversion/tests/cmdline/svntest/actions.py (revision 1877286)
> +++ subversion/tests/cmdline/svntest/actions.py (working copy)
> @@ -418,7 +418,7 @@
> # Since main.run_svnrdump() uses binary mode, normalize the stderr
> # line endings on Windows ourselves.
> if sys.platform == 'win32':
> - err = map(lambda x : x.replace('\r\n', '\n'), err)
> + err = [x.replace('\r\n', '\n') for x in err]
>
> # Ignore "consider upgrade" warnings to allow regression tests to pass
> # when run against a 1.6 mod_dav_svn.
> ]]]

Perfect! This fixes all the svnrdump tests for Python 3 on Windows
(and to be sure I confirmed they also still work with Python 2).

Thanks,

-- 
Johan
Received on 2020-05-03 03:05:14 CEST

This is an archived mail posted to the Subversion Dev mailing list.