You may run the unit tests by running test.py:
python3 test.py
You can test the code vs all of your python source files by copying them to the input directory, then running the program:
cp your_source/* ./input
python3 run.py
There are many edge cases that were handled to produce the correct output:
- Blank files have one line
- If the
#
character is inside a string, it should not be counted as a comment - Escaped
'
or"
inside a string should not close the string TODO
inside a string does not count as a todo- Block comments might be opened and closed in one line in one line:
'''hello'''
or"""hello"""