-
Notifications
You must be signed in to change notification settings - Fork 3
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
Reopen "Change test_name's formart to file_path#class#func" #12
Conversation
@ninjinkun #10 I left a few comments on the PR! 🙏 |
@shuheiktgw I continue #10 discussion on this PR. #10 (comment) Yes. I worried about the same thing. Developers change directories not frequently but sometimes they do. Although we can add an option to specify the root directory, I worried they can't continue to maintain the relationship between the root directory and test directories. |
I'm researching how Git solves this consistency problem |
#10 (comment) I fixed this issue. |
#10 (comment) For this test generator problem, I plan to aggregate all generated tests' results. For example, |
@ninjinkun Hmm,
|
@shuheiktgw It works. However, I worried about generating tests with random parameters. If we use |
@shuheiktgw But at this time, we need to go forward. I'm going to use the name with parameters such as |
launchable/plugin.py
Outdated
def get_test_name(t): | ||
if isinstance(t.context, ModuleType): | ||
return t.context.__name__ | ||
file_path, module, = test_address(t.test) |
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 guess a function name is missing...?
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 fixed it!
launchable/plugin.py
Outdated
@@ -92,7 +92,8 @@ def afterTest(self, test): | |||
|
|||
@protect | |||
def addError(self, test, err, capt=None): | |||
self._addResult(test, CaseEvent.TEAT_FAILED, self._uploader.enqueue_failure) | |||
if err is not ImportError: |
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.
It seems if a non-existing test is specified, err is tuple like: (<class 'ValueError'>, ValueError('No such test aaa'), <traceback object at 0x1044a2040>)
. You can check this by running nosetests tests/dir3/test1.py:aaa -v --nocapture --nologcapture --launchable --launchable-build-number 1
in the rocket-car repo if you need!
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 fixed to handle ValueError type
@shuheiktgw My apologies, my local testing has failed because of the wrong auth token. I'm going to fix my local, then fix my code. |
@shuheiktgw I fixed them |
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.
LGTM! 👍
@shuheiktgw I reopen #10. Sorry for confusing you.