areusch commented on a change in pull request #8869:
URL: https://github.com/apache/tvm/pull/8869#discussion_r698341956
##########
File path: tests/micro/arduino/test_arduino_workflow.py
##########
@@ -49,6 +51,30 @@ def project_dir(workspace_dir):
return workspace_dir / "project"
+# Saves the Arduino project's state, runs the test, then resets it
[email protected](scope="function")
+def does_not_affect_state(project_dir):
Review comment:
maybe name this save_generated_project_state? also, i think this should
depend on `project` fixture, even if it doesn't use it directly in the function?
##########
File path: tests/micro/arduino/test_arduino_workflow.py
##########
@@ -49,6 +51,30 @@ def project_dir(workspace_dir):
return workspace_dir / "project"
+# Saves the Arduino project's state, runs the test, then resets it
[email protected](scope="function")
+def does_not_affect_state(project_dir):
+ with tempfile.TemporaryDirectory() as temp_dir:
+ prev_project_state = pathlib.Path(temp_dir)
+ shutil.copytree(project_dir, prev_project_state / "project")
+ yield
+
+ # We can't delete project_dir or it'll mess up the Arduino CLI working
directory
Review comment:
could you explain why or what specific behavior deleting the directory
triggers?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]