-
Notifications
You must be signed in to change notification settings - Fork 270
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
post_run: add report data to 'Results' object/class #578
Conversation
74364ba
to
07d9482
Compare
vunit/ui/results.py
Outdated
""" | ||
return { | ||
test.name: { | ||
"status": test._status.name, # pylint: disable=protected-access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a method to_dict to test instead of using private access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it now. However, private access is required for _test_results_in_order()
. Should I add to_dict
to TestReport
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there are no new tests added for this.
3df51b4
to
19441a8
Compare
I didn't find tests in EDIT I now added a test named |
43e5010
to
0ab86fd
Compare
I think we should not expose dicts for individual test results on the public api since it is harder to change without breaking in the future. Also see my other line comments. |
0fe1b3d
to
93fae03
Compare
I added and used class
I don't see any other comments. Maybe you have some unfinished review? |
4804629
to
54964dd
Compare
5370dd0
to
80f2797
Compare
* add test_dict_report_with_all_passed_tests * add classes Report and TestResult to vunit.ui.results
80f2797
to
3d32dbf
Compare
Close #445
Close #478
Close #574
In this PR, parameters
output_path
andreport
are passed frommain
to theResults
object built and passed topost_run
callbacks. Instead of exposing theTestReport
object, as suggested in #445, a subset of info is extracted for each test: name, status, time and path. The path is relative tojoin(output_path, 'test_output')
.Usage example:
@felixn, you can build the path to each test log as follows:
join(results.output_path, 'test_output', val.path, 'output.txt')
. Alternatively:join(results.output_path, 'test_output', results.get_report().items()[<test_name>], 'output.txt')
./cc @richjyoung