Structure of TestCodeFlow
code
|
v
+-------------------+
| TestCodeFileEdit | Edit a temp code file with the code to be tested and necessary imports (manually added): https://huggingface.co/Tachi67/TestCodeFlowModule/blob/main/TestCodeFileEditAtomicFlow.py
+-------------------+
|
| (temp_code_file_location)
|
v
+------------------+
| CodeTesting | Opens up the temp file until user closes the file, run the test code.
+------------------+
|
| (feedback)
|
v
feedback
Memory_files:
- library.py
Table of Contents
TestCodeFlow
TestCodeFlow Objects
class TestCodeFlow(SequentialFlow)
This class is used to test code. It is a sequential flow that runs the following steps:
- Prepares the code to be tested, it is composed of the code to be tested and necessary import statements manually added.
- Opens the code in VSCode and waits for the user to clode the vscode session. The user is able to add tests.
- The following will be tested: a. (Default & Compulsory) Code syntax; b. (Added by user) Any other tests.
- Runs the test and returns the output.
Input Interface:
code
(str): The code to be tested.
Output Interface:
feedback
(str): The test results.
TestCodeFileEditAtomicFlow
TestCodeFileEditAtomicFlow Objects
class TestCodeFileEditAtomicFlow(CodeFileEditAtomicFlow)
Refer to: https://huggingface.co/Tachi67/CodeFileEditFlowModule/tree/main
__init__
CodeTestingAtomicFlow
CodeTestingAtomicFlow Objects
class CodeTestingAtomicFlow(InterpreterAtomicFlow)
This class inherits from InterpreterAtomicFlow and is used to test code.
Input Interface:
temp_code_file_location
: Location of the file containing the code to be tested.
Output Interface:
feedback
: Feedback from the test (i.e. test results).