diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-01-20 23:09:32 -0500 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-01-20 23:09:32 -0500 |
commit | 94596f0913cfdc33ffc85aac1005ea745d6559f8 (patch) | |
tree | 2a3bed9a552c897602d8388cad179c406bd586a0 | |
parent | c06cab129456459886f0b49c3e0f303e647e2350 (diff) |
tests/events_test.py: fixed the path_deletedp function.
-rw-r--r-- | tests/events_test.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/events_test.py b/tests/events_test.py index a0badcc..37615a9 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -94,18 +94,17 @@ def renamedp(old_p, new_p): assert path.exists(new_path) -def path_deletedp(p): +def path_deletedp(p, is_dir=False): """ Checks if the directory or respective file shards is deleted under node directories. p: path to the directory or file, under the combox directory, that was deleted. + is_dir: set to True if `p' denotes a deleted directory. Default value is False. """ nodes = get_nodedirs(config) - is_dir = True if path.isdir(p) else False i = 0 - for node in nodes: rel_path = relative_path(p, config) @@ -176,8 +175,8 @@ def test_CEH(): os.rmdir(TEST_DIR_0) time.sleep(2) path_deletedp(TEST_FILE_COPY_1) - path_deletedp(TEST_DIR_1) - path_deletedp(TEST_DIR_0) + path_deletedp(TEST_DIR_1, True) + path_deletedp(TEST_DIR_0, True) observer.stop() observer.join() |