File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ # Project-specific rules
2+ build /
3+
14# Byte-compiled / optimized / DLL files
25__pycache__ /
36* .py [cod ]
Original file line number Diff line number Diff line change @@ -87,6 +87,17 @@ def generate_next_attempt(test_results: str) -> None:
8787 _out .write (response .content )
8888
8989
90+ def teardown () -> None :
91+ codegen_path = os .path .join ("." , "generated" )
92+ build_path = os .path .join ("." , "build" )
93+ if not os .path .exists (build_path ):
94+ os .makedirs (build_path )
95+ with open (os .path .join (codegen_path , "test_class.py" ), "r+" ) as generated_file :
96+ with open (os .path .join (build_path , "test_class.py" ), "w+" ) as _out :
97+ _out .write (generated_file .read ())
98+ generated_file .truncate (0 )
99+
100+
90101def chat () -> None :
91102 generate_first_attempt ()
92103 for _ in range (5 ):
@@ -95,6 +106,7 @@ def chat() -> None:
95106 generate_next_attempt (test_results )
96107 else :
97108 break
109+ teardown ()
98110 print ("Done! All tests are passing, or there is some problem with the test suite itself." )
99111
100112@app .command ()
You can’t perform that action at this time.
0 commit comments