Skip to content

Commit

Permalink
Fixes for pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
dotsdl committed Jul 11, 2016
1 parent 61af38c commit 5dbd8a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/datreant/core/tests/test_rsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ def _create_tree(name, files=[]):

return tree


def test_overwrite(tmpdir):
with tmpdir.as_cwd():
sequoia = _create_tree('sequoia', ['hello.txt', 'data/hello.txt',
'data/world.dat', 'world.dat'])
sequoia2 = dtr.Tree("sequoia2").makedirs()

# Upload contents
sequoia.sync(sequoia2, mode='upload')

# Change contents
open(sequoia2['hello.txt'].abspath, 'w').write('newcontent')

# Upload contents again
sequoia.sync(sequoia2, mode='upload')

# Verify that the hello.txt is not overwritten
assert sequoia2['hello.txt'].read() == 'newcontent'



def test_excludes(tmpdir):
Expand Down
2 changes: 1 addition & 1 deletion src/datreant/core/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,5 +501,5 @@ def sync(self, other, mode='upload', compress=True, checksum=True,
# Here we do some massaging before passing to the rsync function
return rsync(source, dest, compress=compress, backup=backup,
dry=dry, include=include, checksum=checksum,
overwrite=overwrite, exclude=exclude,
overwrite=overwrite, exclude=exclude,
rsync_path=rsync_path)

0 comments on commit 5dbd8a9

Please sign in to comment.