### 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) * [TestCodeFlow](#TestCodeFlow.TestCodeFlow) * [TestCodeFileEditAtomicFlow](#TestCodeFileEditAtomicFlow) * [TestCodeFileEditAtomicFlow](#TestCodeFileEditAtomicFlow.TestCodeFileEditAtomicFlow) * [\_\_init\_\_](#__init__) * [CodeTestingAtomicFlow](#CodeTestingAtomicFlow) * [CodeTestingAtomicFlow](#CodeTestingAtomicFlow.CodeTestingAtomicFlow) # TestCodeFlow ## TestCodeFlow Objects ```python class TestCodeFlow(SequentialFlow) ``` This class is used to test code. It is a sequential flow that runs the following steps: 1. Prepares the code to be tested, it is composed of the code to be tested and necessary import statements manually added. 2. Opens the code in VSCode and waits for the user to clode the vscode session. The user is able to add tests. 3. The following will be tested: a. (Default & Compulsory) Code syntax; b. (Added by user) Any other tests. 4. 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 ```python class TestCodeFileEditAtomicFlow(CodeFileEditAtomicFlow) ``` Refer to: https://huggingface.co/Tachi67/CodeFileEditFlowModule/tree/main # \_\_init\_\_ # CodeTestingAtomicFlow ## CodeTestingAtomicFlow Objects ```python 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).