You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by fu...@apache.org on 2019/09/22 23:03:52 UTC
svn commit: r1867362 -
/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py
Author: futatuki
Date: Sun Sep 22 23:03:52 2019
New Revision: 1867362
URL: http://svn.apache.org/viewvc?rev=1867362&view=rev
Log:
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
Reported by: jcorvel
Modified:
subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py
Modified: subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py?rev=1867362&r1=1867361&r2=1867362&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py (original)
+++ subversion/branches/swig-py3/subversion/bindings/swig/python/tests/client.py Sun Sep 22 23:03:52 2019
@@ -439,7 +439,8 @@ class SubversionClientTestCase(unittest.
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 @@ class SubversionClientTestCase(unittest.
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 @@ class SubversionClientTestCase(unittest.
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)