异步优化写入备份
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import asyncio
|
||||
from core.objects.blob_object import BlobObject
|
||||
import hashlib
|
||||
import tempfile
|
||||
@@ -11,7 +12,8 @@ class Test_Blob:
|
||||
newBlob.object_id
|
||||
== hashlib.sha1(open("README.md", "rb").read()).hexdigest()
|
||||
)
|
||||
|
||||
def test_writeBlob(self):
|
||||
newBlob = BlobObject("README.md")
|
||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||
newBlob.writeBlob(tmpdirname)
|
||||
asyncio.run(newBlob.writeBlob(tmpdirname))
|
||||
Reference in New Issue
Block a user