Explorar o código

object_store: Allow MemoryObjectStore object deletion for tests.

Change-Id: I50e17d808849e7948178a84db812690d1f8f0f69
Dave Borowitz %!s(int64=14) %!d(string=hai) anos
pai
achega
7a4cd4bb17
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      dulwich/object_store.py

+ 4 - 0
dulwich/object_store.py

@@ -579,6 +579,10 @@ class MemoryObjectStore(BaseObjectStore):
     def __getitem__(self, name):
         return self._data[name]
 
+    def __delitem__(self, name):
+        """Delete an object from this store, for testing only."""
+        del self._data[name]
+
     def add_object(self, obj):
         """Add a single object to this object store.