summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
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