Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add --detailed option for buildtest report #1567
Add --detailed option for buildtest report #1567
Changes from 27 commits
afcdce3
06e3ad7
73402c4
2c45a21
25080ce
b127342
c55e844
03bb642
0e6d2ff
bf9002c
5c981f0
de99b8f
ba21963
15ce5ab
0e0cbd0
094252b
922590d
0847e10
95c9a20
62337ae
0228eab
88f263a
06645ed
71b85c0
294b8c5
7dafa0f
05aaea1
bb018c3
7f7a030
62467b3
7ac315e
8cab76f
ac93439
91dbb51
931e000
619b9ce
5ad52a1
f00a896
3cedce2
012f879
28bf2c1
eedb821
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Create a class variable format_fields_detailed and declare this. Then assign self.format to this variable
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.
this is a good test. I think we should update the
__init__
method ofReport
class to also raise an exception if we invoke the followingRight now we have the exception raised from argparse but there is nothing stop it from happening when invoking the class method.
I think you should have this as a separate method call it
test_report_detailed
where you this negative assertion and also move the codeThere 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.
@shahzebsiddiqui This is not clear to me, I am trying to fix it since yesterday, I used this code:
try:
report=Report(configuration=configuration, format_detailed=True, format_args="name,id,user")
except argparse.ArgumentError:
console.print_exception()
return True
The result when I run
buildtest report --detailed --format name,id
:(anwar)anwar@DOE6991925 buildtest % buildtest report --detailed --format name,id
usage: buildtest [options] [COMMANDS] report [-h] [--pager] [--row-count] [-t]
[-n] [-c COUNT] [--filter FILTER]
[--helpfilter] [--filterfields]
[--helpformat] [--formatfields]
[--format FORMAT | -d] [-f | -p]
[-s START] [-e END] [--latest]
[--oldest]
...
buildtest [options] [COMMANDS] report: error: argument --format: not allowed with argument -d/--detailed
But when I run
buildtest report --detailed
132 │ │ try:
││ ❱ 133 │ │ │ report=Report(configuration=configuration, format_detailed │
RecursionError: maximum recursion depth exceeded
Any advise?
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.
Please fix your message above it's not readable.
You need to format your message properly
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 don't understand what you are doing updating the Report class in init was meant to catch exception as part of regression test but your output above is sharing an invocation to buildtest. Either I am not clear in what I am asking or you have trouble conveying your message. Note you don't need to share the code you want to try just commit it so I can see the changes.
It's better you just share the screenshot for error and please delete your message.