mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(unittest): Parallel Test failure because of shared memory (#7729)
Co-authored-by: Carlos Freund <carlosfreund@gmail.com>
This commit is contained in:
parent
0519e9e3c2
commit
f830d5814c
@ -3,14 +3,14 @@ import os
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.storage.files import FileStore
|
||||
|
||||
IN_MEMORY_FILES: dict = {}
|
||||
|
||||
|
||||
class InMemoryFileStore(FileStore):
|
||||
files: dict[str, str]
|
||||
|
||||
def __init__(self, files: dict[str, str] = IN_MEMORY_FILES):
|
||||
self.files = files
|
||||
def __init__(self, files: dict[str, str] | None = None) -> None:
|
||||
self.files = {}
|
||||
if files is not None:
|
||||
self.files = files
|
||||
|
||||
def write(self, path: str, contents: str | bytes) -> None:
|
||||
if isinstance(contents, bytes):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user