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

Unified Diff: typ/runner.py

Issue 2322963004: Clean up formatting, rework run wrapper script to not use globals. (Closed)
Patch Set: update w/ review feedback, lint Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « typ/fakes/test_result_server_fake.py ('k') | typ/tests/main_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: typ/runner.py
diff --git a/typ/runner.py b/typ/runner.py
index 7f5aeed6cf18fc4c9da541b8de026d350f7cd8bb..4d64b78027583dea405e27a62fd664f1a49dcd0f 100644
--- a/typ/runner.py
+++ b/typ/runner.py
@@ -357,8 +357,8 @@ class Runner(object):
total_shards = args.total_shards
assert total_shards >= 1
assert shard_index >= 0 and shard_index < total_shards, (
- 'shard_index (%d) must be >= 0 and < total_shards (%d)' %
- (shard_index, total_shards))
+ 'shard_index (%d) must be >= 0 and < total_shards (%d)' %
+ (shard_index, total_shards))
test_set.parallel_tests = _sort_inputs(
test_set.parallel_tests)[shard_index::total_shards]
test_set.isolated_tests = _sort_inputs(
@@ -407,6 +407,8 @@ class Runner(object):
add_tests(suite)
else:
add_tests(loader.loadTestsFromName(name))
+
+ # pylint: disable=no-member
if hasattr(loader, 'errors') and loader.errors:
# In Python3's version of unittest, loader failures get converted
# into failed test cases, rather than raising exceptions. However,
« no previous file with comments | « typ/fakes/test_result_server_fake.py ('k') | typ/tests/main_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698