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

Unified Diff: recipe_modules/platform/test_api.py

Issue 2887543002: [platform] improve testing assertions (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/platform/test_api.py
diff --git a/recipe_modules/platform/test_api.py b/recipe_modules/platform/test_api.py
index 934b0bbf552b323736185b618d68def25806c3f5..ef2cd082ded4ce28f1282d9dd3136d3f870adc36 100644
--- a/recipe_modules/platform/test_api.py
+++ b/recipe_modules/platform/test_api.py
@@ -8,20 +8,20 @@ class PlatformTestApi(recipe_test_api.RecipeTestApi):
@recipe_test_api.mod_test_data
@staticmethod
def name(name):
- assert name in ('win', 'linux', 'mac')
+ assert name in ('win', 'linux', 'mac'), 'unknown platform %r' % (name,)
return name
@recipe_test_api.mod_test_data
@staticmethod
def bits(bits):
- assert bits in (32, 64)
+ assert bits in (32, 64), 'unknown bitness %r' % (bits,)
return bits
@recipe_test_api.mod_test_data
@staticmethod
def cpu_count(cpu_count):
- assert isinstance(cpu_count, int)
- assert cpu_count > 0
+ assert isinstance(cpu_count, int), 'bad type %r' % (type(cpu_count),)
+ assert cpu_count > 0, 'bad cpu_count %r' % (cpu_count,)
return cpu_count
def __call__(self, name, bits):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698