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

Unified Diff: chrome/common/extensions/docs/server2/integration_test.py

Issue 13896007: Devserver: run the cron over the examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again to avoid .svn Created 7 years, 8 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
Index: chrome/common/extensions/docs/server2/integration_test.py
diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py
index 585f107ea2fcf51acd69e975e291fff2508359e2..262e8ee6139e849acb5d11bea73ad7a4a9e6e6d2 100755
--- a/chrome/common/extensions/docs/server2/integration_test.py
+++ b/chrome/common/extensions/docs/server2/integration_test.py
@@ -26,7 +26,8 @@ def _GetPublicFiles():
'''
public_path = os.path.join(_BASE_PATH, 'docs', 'templates', 'public', '')
public_files = {}
- for path, dirs, files in os.walk(public_path):
+ for path, dirs, files in os.walk(public_path, topdown=True):
+ dirs[:] = [d for d in dirs if d != '.svn']
relative_path = path[len(public_path):]
for filename in files:
with open(os.path.join(path, filename), 'r') as f:
@@ -60,10 +61,12 @@ class IntegrationTest(unittest.TestCase):
try:
for path, content in _GetPublicFiles().iteritems():
def check_result(render_content, render_status, _):
- self.assertEqual(200, render_status)
+ self.assertEqual(200, render_status,
+ 'Got %s when rendering %s' % (render_status, path))
# This is reaaaaally rough since usually these will be tiny templates
# that render large files. At least it'll catch zero-length responses.
- self.assertTrue(len(render_content) >= len(content))
+ self.assertTrue(len(render_content) >= len(content),
+ 'Content was "%s" when rendering %s' % (render_content, path))
check_result(*self._renderer.Render(path))
# Samples are internationalized, test some locales.
if path.endswith('/samples.html'):
« no previous file with comments | « chrome/common/extensions/docs/server2/handler.py ('k') | chrome/common/extensions/docs/server2/local_file_system.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698