Pycharm: Read From Standard Input In "debug" Mode
I'm debugging this script in PyCharm: import sys def read_in(): lines = sys.stdin.readlines() for i in range(len(lines)): lines[i] = lines[i].replace('\n','')
Solution 1:
Personally, I'd just use patch to replace sys.stdin.readlines() with a Mock, with the return value you desire. Place that into a unit test, and run the unit test.
Post a Comment for "Pycharm: Read From Standard Input In "debug" Mode"