From 54d70dad75387e0369c2b67dacff80d32d3cfc1e Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Tue, 29 Sep 2015 14:15:49 -0400 Subject: [bug fix] fix for :b#2: Now combox ignores tmp files created by editors. modified: TODO.org modified: combox/events.py modified: tests/events_test.py modified: tests/utils.py --- tests/utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/utils.py') diff --git a/tests/utils.py b/tests/utils.py index dc7a309..3f46813 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -109,6 +109,18 @@ def shardedp(f): assert path.exists(shard) and path.isfile(shard) +def not_shardedp(f): + """Checks if file's shards does not exists in the node directories""" + config = get_config() + nodes = get_nodedirs(config) + i = 0 + for node in nodes: + rel_path = relative_path(f, config) + shard = "%s.shard%s" % (path.join(node, rel_path), i) + i += 1 + assert not path.exists(shard) and not path.isfile(shard) + + def dirp(d): """ Checks if the directory was created under node directories -- cgit v1.2.3