Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
archive = dir_archive(cached=False,fast=True)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,compression=3)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,memmode='r+')
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,serialized=False)
check_basic(archive)
#check_numpy(archive) #FIXME: see issue #53
rmtree('memo')
def test_foo():
# start fresh
rmtree('foo', ignore_errors=True)
d = dir_archive('foo', cached=False)
key = '1234TESTMETESTMETESTME1234'
d._mkdir(key)
#XXX: repeat mkdir does nothing, should it clear? I think not.
_dir = d._mkdir(key)
assert d._getdir(key) == _dir
d._rmdir(key)
# with _pickle
x = [1,2,3,4,5]
d._fast = True
d[key] = x
assert d[key] == x
d._rmdir(key)
# with dill
d._fast = False
archive = dir_archive(cached=False)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,fast=True)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,compression=3)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,memmode='r+')
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,serialized=False)
check_basic(archive)
#check_numpy(archive) #FIXME: see issue #53
rmtree('memo')
def test_archive():
# try some of the different __init__
archive = dir_archive(cached=False)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,fast=True)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,compression=3)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,memmode='r+')
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,serialized=False)
check_basic(archive)
#check_numpy(archive) #FIXME: see issue #53
rmtree('memo')
def test_archive():
# try some of the different __init__
archive = dir_archive(cached=False)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,fast=True)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,compression=3)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,memmode='r+')
check_basic(archive)
def test_archive():
# try some of the different __init__
archive = dir_archive(cached=False)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,fast=True)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,compression=3)
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,memmode='r+')
check_basic(archive)
check_numpy(archive)
#rmtree('memo')
archive = dir_archive(cached=False,serialized=False)
check_basic(archive)