init
This commit is contained in:
		
							
								
								
									
										0
									
								
								tests/core/objects/test_back_object.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/core/objects/test_back_object.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										17
									
								
								tests/core/objects/test_blob_object.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								tests/core/objects/test_blob_object.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| from core.objects.blob_object import BlobObject | ||||
| import hashlib | ||||
| import tempfile | ||||
|  | ||||
|  | ||||
| class Test_Blob: | ||||
|  | ||||
|     def test_newBlob(self): | ||||
|         newBlob = BlobObject("README.md") | ||||
|         assert ( | ||||
|             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) | ||||
							
								
								
									
										0
									
								
								tests/core/objects/test_tree_object.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/core/objects/test_tree_object.py
									
									
									
									
									
										Normal file
									
								
							
		Reference in New Issue
	
	Block a user