]> git.parisson.com Git - pdf.js.git/commitdiff
Check for browsers in verifyOptions, so the script fails early.
authorRob Sayre <sayrer@gmail.com>
Sun, 26 Jun 2011 17:58:41 +0000 (10:58 -0700)
committerRob Sayre <sayrer@gmail.com>
Sun, 26 Jun 2011 17:58:41 +0000 (10:58 -0700)
test/test.py

index 96aeb5cec3289fce9651b8a490ac590ca17a5546..b867251ee0a7560d900d9e3baf8137a3995e743d 100644 (file)
@@ -37,6 +37,8 @@ class TestOptions(OptionParser):
             options.manifestFile = DEFAULT_MANIFEST_FILE
         if options.browser and options.browserManifestFile:
             print "Warning: ignoring browser argument since manifest file was also supplied"
+        if not options.browser and not options.browserManifestFile:
+            self.error("No test browsers found. Use --browserManifest or --browser args.")
         return options
         
 def prompt(question):
@@ -219,10 +221,9 @@ def setUp(options):
     if options.browserManifestFile:
         testBrowsers = makeBrowserCommands(options.browserManifestFile)
     elif options.browser:
-        testBrowsers = [BrowserCommand({"path":options.browser, "name":"firefox"})] 
-    else:
-        print "No test browsers found. Use --browserManifest or --browser args."
-              
+        testBrowsers = [BrowserCommand({"path":options.browser, "name":"firefox"})]
+    assert len(testBrowsers) > 0
+
     with open(options.manifestFile) as mf:
         manifestList = json.load(mf)