From aef9c53be89ede4157bb3d4f700dbe83fc5afaea Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 12 Mar 2019 14:40:42 -0400 Subject: [PATCH] Perhaps actually fix this test on Windows --- src/allmydata/test/test_magic_folder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 63544aa52..c2c7e4311 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -1890,19 +1890,19 @@ class SingleMagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, Reall @inline_callbacks def test_create_file_in_sub_directory(self): reldir_u = u'subdir' - # Intentionally avoid doing a platform-respecting directory separator - # here. _create_directory_with_file can deal with any separator. - # _get_collective_latest_file requires exactly / as a separator. - relpath_u = u'/'.join((reldir_u, u'some-file')) + # The OS and the DMD may have conflicting conventions for directory + # the separator. Construct a value for each. + dmd_relpath_u = u'/'.join((reldir_u, u'some-file')) + platform_relpath_u = join(reldir_u, u'some-file') content = u'some great content' yield self._create_directory_with_file( - relpath_u, + platform_relpath_u, content, ) # The new directory and file should have been noticed and uploaded. downloader = self.magicfolder.downloader encoded_dir_u = magicpath.path2magic(reldir_u + u"/") - encoded_path_u = magicpath.path2magic(relpath_u) + encoded_path_u = magicpath.path2magic(dmd_relpath_u) with start_action(action_type=u"retrieve-metadata"): dir_node, dir_meta = yield downloader._get_collective_latest_file(