-
Notifications
You must be signed in to change notification settings - Fork 508
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: start_time to be defined before clean() and setup() #6115
Conversation
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @grom72)
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @janekmi)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)
src/test/unittest/basetest.py
line 171 at r1 (raw file):
""" self.ctx = c start_time = None
Why?
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @osalyk)
src/test/unittest/basetest.py
line 171 at r1 (raw file):
Previously, osalyk (Oksana Sałyk) wrote…
Why?
Otherwise, if any of the clean() or setup() steps fail before the start_time
is assigned for the first time you will end up with an error followed by an error.
futils.Fail: xxx
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./RUNTESTS.py", line 220, in <module>
main()
File "./RUNTESTS.py", line 216, in main
sys.exit(runner.run_tests())
File "./RUNTESTS.py", line 119, in run_tests
t._execute(c)
File "/home/jmichal/work/pmdk/src/test/unittest/basetest.py", line 190, in _execute
if start_time is not None:
UnboundLocalError: local variable 'start_time' referenced before assignment
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)
src/test/unittest/basetest.py
line 171 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Otherwise, if any of the clean() or setup() steps fail before the
start_time
is assigned for the first time you will end up with an error followed by an error.futils.Fail: xxx During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./RUNTESTS.py", line 220, in <module> main() File "./RUNTESTS.py", line 216, in main sys.exit(runner.run_tests()) File "./RUNTESTS.py", line 119, in run_tests t._execute(c) File "/home/jmichal/work/pmdk/src/test/unittest/basetest.py", line 190, in _execute if start_time is not None: UnboundLocalError: local variable 'start_time' referenced before assignment
Maybe leave a trace of it as a comment in the code.
b0971b0
to
6b4a6b4
Compare
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.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @osalyk)
src/test/unittest/basetest.py
line 171 at r1 (raw file):
Previously, osalyk (Oksana Sałyk) wrote…
Maybe leave a trace of it as a comment in the code.
Done.
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @janekmi)
Signed-off-by: Tomasz Gromadzki <[email protected]>
common: fix cstyle introduced by PR #6115
Just in case any of these fails it has to be defined. Signed-off-by: Jan Michalski <[email protected]>
Just in case any of these fails it has to be defined.
This change is