Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Issue #239: Fix test case syntax in python2.7
  • Loading branch information
spaceone committed Sep 12, 2018
1 parent 7026789 commit 1d44be7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/io/test_notify.py
Expand Up @@ -28,9 +28,10 @@ def __init__(self, app, watcher, tmpdir, timeout=0.5):
self.tmpdir = tmpdir
self.timeout = timeout

def create(self, *targets, assert_created=True, dir=False):
def create(self, *targets, **kwargs):
assert_created = kwargs.get('assert_created', True)
target = os.path.join(*targets)
self.tmpdir.ensure(target, dir=dir)
self.tmpdir.ensure(target, dir=kwargs.get('dir', False))
self.watcher.wait("created", timeout=self.timeout)
assert self.app.created_status == assert_created
# Reset for next call
Expand Down Expand Up @@ -152,5 +153,3 @@ def test_notify_subdir_recursive_no_auto_add(notify, tmpdir, creator):
creator.create(subdir, "helloworld.txt", assert_created=False)

# Skip notify.remove_path() because pyinotify is broken


0 comments on commit 1d44be7

Please sign in to comment.