OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import unittest | 4 import unittest |
5 | 5 |
6 from telemetry import page_set | 6 from telemetry.page import page_set |
7 import page_sets | 7 import page_sets |
8 | 8 |
9 class PageSetsUnittest(unittest.TestCase): | 9 class PageSetsUnittest(unittest.TestCase): |
10 """Verfies that all the pagesets in this directory are syntactically valid.""" | 10 """Verfies that all the pagesets in this directory are syntactically valid.""" |
11 | 11 |
12 @staticmethod | 12 @staticmethod |
13 def testPageSetsParseCorrectly(): | 13 def testPageSetsParseCorrectly(): |
14 filenames = page_sets.GetAllPageSetFilenames() | 14 filenames = page_sets.GetAllPageSetFilenames() |
15 for filename in filenames: | 15 for filename in filenames: |
16 try: | 16 try: |
17 page_set.PageSet.FromFile(filename) | 17 page_set.PageSet.FromFile(filename) |
18 except Exception, ex: | 18 except Exception, ex: |
19 raise Exception("Pageset %s: %s" % (filename, str(ex))) | 19 raise Exception("Pageset %s: %s" % (filename, str(ex))) |
OLD | NEW |