On 2019/09/20 0:44, Daniel Shahaf wrote:
Yasuhito FUTATSUKI wrote on Thu, 19 Sep 2019 06:41 +00:00:
The FAIL on test_merge_peg3 is a newline style issue on reading file
in raw mode, which is introduced by my patch.
(https://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py?view=annotate#l438)
Rest of those errors and failures are in the tests that were added only
to swig-py, and it seems most of the causes of them are confusion of
paths in platform specific format and Subversion's canoical format,
as the comment in SubversionClientTestCase.test_update4() says.
(I'll try to fix those issues on check-swig-py later, hopefully
next weekend.)
Thanks! No rush.
Now I re-sync swig-py3 branch with trunk and make a patch addressing
issues on testing on other than Unix/Linux platform.
I've tested on FreeBSD 11.2, with Python 2.7 and Python 3.6.
Could anyone please test it on Windows ?
Cheers,
--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
On branch swig-py3: Fix test for swig-py on Windows
* subversion/bindings/swig/python/tests/client.py:
(SubversionClientTestCase.test_merge_peg3): Concern platform specific
new line style.
(SubversionClientTestCase.test_conflict): Discriminate between local path
and canonical path
(SubversionClientTestCase.test_shelf): Discriminate between local path
and canonical path
Index: subversion/bindings/swig/python/tests/client.py
===================================================================
--- subversion/bindings/swig/python/tests/client.py (revision 1867212)
+++ subversion/bindings/swig/python/tests/client.py (working copy)
@@ -439,7 +439,8 @@
readme_text = readme.read()
readme.close()
- self.assertEqual(readme_text, b'This is a test.\n')
+ self.assertEqual(readme_text,
+ b'This is a test.' + os.linesep.encode('UTF-8'))
def test_platform_providers(self):
providers = core.svn_auth_get_platform_specific_client_providers(None,
None)
@@ -579,10 +580,10 @@
client.checkout2(self.repos_uri, path, rev, rev, True, True,
self.client_ctx)
- trunk_path = os.path.join(path, b'trunk')
+ trunk_path = core.svn_dirent_join(path, b'trunk')
# Create a conflicting path
- os.mkdir(trunk_path)
+ os.mkdir(core.svn_dirent_local_style(trunk_path))
rev.value.number = 2
@@ -619,10 +620,10 @@
self.assertTrue(isinstance(shelf, client.svn_client__shelf_t))
- new_subpath = os.path.join(b'trunk', b'new-shelf-test.txt')
- new_path = os.path.join(path, new_subpath)
+ new_subpath = core.svn_relpath_join(b'trunk', b'new-shelf-test.txt')
+ new_path = core.svn_dirent_join(path, new_subpath)
- with open(new_path, "wb") as fp:
+ with open(core.svn_dirent_local_style(new_path), "wb") as fp:
fp.write("A new text file\n".encode('utf8'))
client.add5(new_path, core.svn_depth_unknown, False, False, False, True,
self.client_ctx, pool)