Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def setUp(self):
self.cache = await peru.cache.Cache(create_dir())
self.content = {
'a': 'foo',
'b/c': 'bar',
'b/d': 'baz',
}
self.content_dir = create_dir(self.content)
self.content_tree = await self.cache.import_tree(self.content_dir)
async def setUp(self):
self.cache_dir = shared.create_dir()
self.cache = await cache.Cache(self.cache_dir)
# Include a leading colon to test that we prepend ./ to pathspecs.
self.content = {'a': 'foo', 'b/c': 'bar', COLON + 'd': 'baz'}
self.content_dir = shared.create_dir(self.content)
self.content_tree = await self.cache.import_tree(self.content_dir)
self.entries = await self.cache.ls_tree(
self.content_tree, recursive=True)
async def setUp(self):
self.cache_dir = create_dir()
self.cache = await Cache(self.cache_dir)
# These tests use this simple one-file tree as module contents.
content = {'a': 'a'}
content_dir = create_dir(content)
self.content_tree = await self.cache.import_tree(content_dir)
async def _init_cache(self):
self.cache = await cache.Cache(self.cache_dir)