(fix) split_bash_commands replaced; temp_dir fixture fix in some tests (#3160)

* split_bash_commands replaced; temp_dir fixture fix in some tests

* tweak test_runtime

* skip 2 tests in test_runtime that need fixing in extra PR

* reverting bash parsing changes and re-enabled tests

* missed to revert a changed assert in test_runtime.py
This commit is contained in:
tobitege 2024-07-29 19:05:58 +02:00 committed by GitHub
parent 7cefd32fd0
commit 2533efabbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 4 deletions

View File

@ -16,7 +16,7 @@ from opendevin.storage import get_file_store
def temp_dir(monkeypatch):
# get a temporary directory
with tempfile.TemporaryDirectory() as temp_dir:
pathlib.Path().mkdir(parents=True, exist_ok=True)
pathlib.Path(temp_dir).mkdir(parents=True, exist_ok=True)
yield temp_dir

View File

@ -14,7 +14,7 @@ from opendevin.runtime.server.runtime import ServerRuntime
def temp_dir(monkeypatch):
# get a temporary directory
with tempfile.TemporaryDirectory() as temp_dir:
pathlib.Path().mkdir(parents=True, exist_ok=True)
pathlib.Path(temp_dir).mkdir(parents=True, exist_ok=True)
yield temp_dir

View File

@ -44,7 +44,7 @@ def print_method_name(request):
def temp_dir(monkeypatch):
# get a temporary directory
with tempfile.TemporaryDirectory() as temp_dir:
pathlib.Path().mkdir(parents=True, exist_ok=True)
pathlib.Path(temp_dir).mkdir(parents=True, exist_ok=True)
yield temp_dir

View File

@ -32,11 +32,18 @@ def create_docker_box_from_app_config(
)
@pytest.fixture(autouse=True)
def print_method_name(request):
print('\n########################################################################')
print(f'Running test: {request.node.name}')
print('########################################################################')
@pytest.fixture
def temp_dir(monkeypatch):
# get a temporary directory
with tempfile.TemporaryDirectory() as temp_dir:
pathlib.Path().mkdir(parents=True, exist_ok=True)
pathlib.Path(temp_dir).mkdir(parents=True, exist_ok=True)
yield temp_dir