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

Test error inputs handling, fix few bugs #119

Merged
merged 3 commits into from
May 17, 2022
Merged

Test error inputs handling, fix few bugs #119

merged 3 commits into from
May 17, 2022

Conversation

pavelkryukov
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2022

Codecov Report

Merging #119 (f738001) into master (301686e) will increase coverage by 1.58%.
The diff coverage is 97.72%.

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
+ Coverage   93.77%   95.35%   +1.58%     
==========================================
  Files           2        3       +1     
  Lines         610      646      +36     
==========================================
+ Hits          572      616      +44     
+ Misses         38       30       -8     
Impacted Files Coverage Δ
test.py 96.96% <96.96%> (ø)
parse.py 93.34% <100.00%> (+2.12%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@pavelkryukov pavelkryukov changed the title Test error inputs handling Test error inputs handling, fix few bugs May 14, 2022
@aswaterman
Copy link
Member

OK with you, @neelgala?

@pavelkryukov
Copy link
Contributor Author

Just a reminder. I have a follower patch to remove duplicate code (fields check and extraction should be a single operation)

@neelgala
Copy link
Collaborator

made one comment.. all else looks good.. sorry for the delay - thanks @pavelkryukov for all the work here :D

@pavelkryukov
Copy link
Contributor Author

@neelgala, sorry, don't see your comment. Have you submitted your review?

parse.py Outdated
@@ -13,6 +13,11 @@
pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format='%(levelname)s:: %(message)s')

def parse_constant(string):
base = 16 if 'x' in string else 2 if 'b' in string else 10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this entire function can just be return int(string,0) 0 automatically indicates python to select the base based on the string prefix

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavelkryukov here is my comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed

@aswaterman aswaterman merged commit f9272e8 into riscv:master May 17, 2022
@pavelkryukov pavelkryukov deleted the test branch May 17, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants