Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deltas: Check and handle input behaviour #45

Closed
2 tasks done
holzkohlengrill opened this issue Jan 9, 2020 · 0 comments
Closed
2 tasks done

Deltas: Check and handle input behaviour #45

holzkohlengrill opened this issue Jan 9, 2020 · 0 comments
Assignees
Labels
bug Something isn't working emma-delta Related to Emma deltas component SP: 5
Milestone

Comments

@holzkohlengrill
Copy link
Collaborator

holzkohlengrill commented Jan 9, 2020

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 .

@holzkohlengrill holzkohlengrill added bug Something isn't working emma-delta Related to Emma deltas component labels Jan 9, 2020
@holzkohlengrill holzkohlengrill added this to the 3.3 milestone Jan 9, 2020
heliocastro pushed a commit that referenced this issue Mar 7, 2022
… in separate functions (#69)

* close #45, added unit tests, checks are done now in separate functions

Co-authored-by: Marcel Schmalzl <Marcel.Schmalzl@partner.bmw.de>
Co-authored-by: Marcel Schmalzl <holzkohlengrill@gmail.com>
Co-authored-by: Marcel Schmalzl <12732886+holzkohlengrill@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emma-delta Related to Emma deltas component SP: 5
Projects
None yet
Development

No branches or pull requests

2 participants