summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-09-29 14:15:49 -0400
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-09-29 14:15:49 -0400
commit54d70dad75387e0369c2b67dacff80d32d3cfc1e (patch)
treeb440706df3bd3c08fc6dd20ceeb5ab2a29a76c35 /tests/utils.py
parent6171a67bb57f5ac10b43da785fe24aeb83fbd609 (diff)
[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
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py12
1 files changed, 12 insertions, 0 deletions
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