j178 / leetgo

Best LeetCode friend for geek. :snowboarder:
MIT License
539 stars 32 forks source link

fix: failed to start local test in contest #175

Closed ygguorun closed 1 year ago

ygguorun commented 1 year ago

When using leetgo test -L -l python b104/1 for local testing, it will raise Case 1: Failed to start error.

The reason is that python.exe and .py files would return relative paths prefixed with contest/, and after cmd.Dir = genResult.OutDir , the file path would change to an error file prefixed with contest/contest/ path. I think returning the absolute path will solve this problem.

Tested in Windows 10.

j178 commented 1 year ago

Thanks a lot!