Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Issue 2363773008: Add better logging when failing to load a test. (Closed)

Created:
4 years, 2 months ago by Dirk Pranke
Modified:
4 years, 2 months ago
Reviewers:
nednguyen
Target Ref:
refs/heads/master
Project:
typ
Visibility:
Public.

Description

Add better logging when failing to load a test. This should help users better debug problems. R=nednguyen@google.com BUG=649217

Patch Set 1 : patch for review #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -17 lines) Patch
M pylintrc View 1 chunk +1 line, -0 lines 0 comments Download
M typ/json_results.py View 1 chunk +1 line, -1 line 0 comments Download
M typ/runner.py View 5 chunks +18 lines, -9 lines 0 comments Download
M typ/tests/main_test.py View 2 chunks +6 lines, -6 lines 5 comments Download
M typ/tests/runner_test.py View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 6 (3 generated)
Dirk Pranke
4 years, 2 months ago (2016-09-24 01:38:30 UTC) #3
nednguyen
lgtm https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py File typ/tests/main_test.py (right): https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py#newcode362 typ/tests/main_test.py:362: self.assertIn('Failed to load "foo" in find_tests', out) Can ...
4 years, 2 months ago (2016-09-24 01:51:45 UTC) #4
Dirk Pranke
4 years, 2 months ago (2016-10-11 23:48:33 UTC) #5
https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py
File typ/tests/main_test.py (right):

https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py#...
typ/tests/main_test.py:362: self.assertIn('Failed to load "foo" in find_tests',
out)
On 2016/09/24 01:51:45, nednguyen wrote:
> Can you assert the out message contains the exception about missing file as
> well?

Done.

https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py#...
typ/tests/main_test.py:374: self.assertIn('Failed to load "foo.py" in
find_tests', out)
On 2016/09/24 01:51:45, nednguyen wrote:
> ditto

Done.

https://codereview.chromium.org/2363773008/diff/40001/typ/tests/main_test.py#...
typ/tests/main_test.py:379: self.assertIn('Failed to load "foo.bar" in
find_tests', out)
I'm not actually sure what I thought I was testing here originally, but I'm
changing this test to assert that we didn't find any tests to run.

Powered by Google App Engine
This is Rietveld 408576698