Deltas: Check and handle input behaviour
Closed this issue · 0 comments
holzkohlengrill commented
Description
Incorrect input data causes deltas to crash. For example:
(info) : Started processing at 14:52:04
Enter project root path >C:\0-repos\Emma\MAdZ-configs\Project
0: Section_Summary
1: Object_Summary
2: Objects_in_Sections
Choose File type >
0
Select two indices seperated by one space >0 0
Traceback (most recent call last):
File "C:/0-repos/Emma/Emma/emma_deltas.py", line 153, in <module>
runEmmaDeltas()
File "C:/0-repos/Emma/Emma/emma_deltas.py", line 149, in runEmmaDeltas
main(parsedArguments)
File "C:/0-repos/Emma/Emma/emma_deltas.py", line 127, in main
candidates = filePresenter.chooseCandidates()
File "C:\0-repos\Emma\Emma\emma_delta_libs\FilePresenter.py", line 55, in chooseCandidates
indices: typing.List[int] = [int(i) for i in indices]
File "C:\0-repos\Emma\Emma\emma_delta_libs\FilePresenter.py", line 55, in <listcomp>
indices: typing.List[int] = [int(i) for i in indices]
ValueError: invalid literal for int() with base 10: ''
Process finished with exit code 1
If an invalid root path is entered deltas raises a FileNotFound
error.
ToDo's
- Write unit tests in order to test alls possible behaviour
- Fix errors
Consider also the expected behaviour in the attachment from #14 .