Skip to content

Commit

Permalink
Correct test_tutorial to use '/' in filepaths on all platforms
Browse files Browse the repository at this point in the history
Note that target filepaths specified in the repo use '/' even on
Windows.

(That property is important to make sure that metadata is platform-
independent.)

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
  • Loading branch information
awwad committed Aug 21, 2018
1 parent f7f003d commit 6b4a4b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ def test_tutorial(self):
octal_file_permissions = oct(os.stat(target4_filepath).st_mode)[4:]
custom_file_permissions = {'file_permissions': octal_file_permissions}
repository.targets.add_target(target4_filepath, custom_file_permissions)
self.assertTrue(os.path.join(
'myproject', 'file4.txt') in repository.targets.target_files)
# Note that target filepaths specified in the repo use '/' even on Windows.
# (This is important to make metadata platform-independent.)
self.assertTrue(
os.path.join('myproject/file4.txt') in repository.targets.target_files)


# Skipping user entry of password
Expand Down

0 comments on commit 6b4a4b2

Please sign in to comment.