Ejemplo n.º 1
0
 def create_array(read_only=False, **kwargs):
     path = mkdtemp()
     atexit.register(shutil.rmtree, path)
     store = NestedDirectoryStore(path)
     kwargs.setdefault('compressor', Zlib(1))
     init_array(store, **kwargs)
     return Array(store, read_only=read_only)
Ejemplo n.º 2
0
def test_nested(dataset):
    """
    Use NestedDirectoryStore to open the dataset fixture. This is the only
    method that is expected to successfully open legacy nested datasets
    without the dimension_separator metadata. However, for none-Nested
    datasets without any metadata, NestedDirectoryStore will fail.
    """
    failure = ("flat_legacy" in dataset or "directory_default" in dataset
               or "fs_default" in dataset)
    verify(Array(store=NestedDirectoryStore(dataset)), failure)
Ejemplo n.º 3
0
 def create_store():
     path = tempfile.mkdtemp()
     atexit.register(atexit_rmtree, path)
     store = NestedDirectoryStore(path)
     return store, None