fix(diff): bugs on diff stdin and numerics #16
|  | @ -13,6 +13,7 @@ from joj3_config_generator.models.const import ( | |||
|     JOJ3_CONFIG_ROOT, | ||||
| ) | ||||
| from joj3_config_generator.models.task import Parser as ParserEnum | ||||
| from joj3_config_generator.utils.logger import logger | ||||
| 
 | ||||
| 
 | ||||
| def get_conf_stage( | ||||
|  | @ -255,12 +256,12 @@ def get_testcases( | |||
| ) -> Set[str]:  # basedir here should be task_conf.root / task_conf.path | ||||
|     testcases = set() | ||||
|     for testcases_path in (task_root / task_path).parent.glob("**/*.in"): | ||||
|         if not os.path.exists(str(testcases_path).removesuffix(".in") + ".out"): | ||||
| 
					
					jon-lee marked this conversation as resolved
					
				 | ||||
|             logger.warning(f"Testcase {testcases_path} has no corresponding .out file") | ||||
|             continue | ||||
|         testcases.add( | ||||
|             str( | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  No. Just do not append it to the return value and log a warning. No. Just do not append it to the return value and log a warning. 
				
					
						李衍志523370910113
						commented  okay okay 
				
					
						李衍志523370910113
						commented  we can probably move some redundant functions like  we can probably move some redundant functions like `get_testcaes` into a `utils.py` as file llines already bit large 
				
					
						张泊明518370910136
						commented  leave it here now. we have not reused the logic. leave it here now. we have not reused the logic. | ||||
|                 testcases_path.relative_to((task_root / task_path).parent) | ||||
|             ).removesuffix(".in") | ||||
|         ) | ||||
|         assert os.path.exists( | ||||
|             str(testcases_path).removesuffix(".in") + ".out" | ||||
|         ), f"{testcases_path} does not have a corresponding *.out file!" | ||||
|     return testcases | ||||
|  |  | |||
|  | @ -111,11 +111,6 @@ | |||
|                                     "src": "/home/tt/.config/joj/diff/case2.in" | ||||
|                                 } | ||||
|                             }, | ||||
|                             { | ||||
|                                 "stdin": { | ||||
|                                     "src": "/home/tt/.config/joj/diff/case3.in" | ||||
|                                 } | ||||
|                             }, | ||||
|                             { | ||||
|                                 "stdin": { | ||||
|                                     "src": "/home/tt/.config/joj/diff/task1/case4.in" | ||||
|  | @ -229,18 +224,6 @@ | |||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "outputs": [ | ||||
|                                         { | ||||
|                                             "score": 100, | ||||
|                                             "fileName": "stdout", | ||||
|                                             "answerPath": "/home/tt/.config/joj/diff/case3.out", | ||||
|                                             "forceQuitOnDiff": false, | ||||
|                                             "alwaysHide": false, | ||||
|                                             "compareSpace": false | ||||
|                                         } | ||||
|                                     ] | ||||
|                                 }, | ||||
|                                 { | ||||
|                                     "outputs": [ | ||||
|                                         { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
if not testcases_path.with_suffix(".out").exists():done