Advertisement
Guest User

Untitled

a guest
Jul 17th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.34 KB | None | 0 0
  1. #!/home/pgulley/schooltool_work/schooltool.quiz/python/bin/python
  2.  
  3. import sys
  4. sys.path[0:0] = [
  5. '/home/pgulley/schooltool_work/schooltool.quiz/src',
  6. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.testrunner-4.0.4-py2.7.egg',
  7. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.interface-4.0.5-py2.7-linux-x86_64.egg',
  8. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.exceptions-4.0.6-py2.7.egg',
  9. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/distribute-0.6.34-py2.7.egg',
  10. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/selenium-2.24.0-py2.7.egg',
  11. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/schooltool.devtools-0.7.3dev_r93-py2.7.egg',
  12. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.ucol-1.0.2-py2.7-linux-x86_64.egg',
  13. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.testing-3.10.3-py2.7.egg',
  14. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.testing-3.10.0-py2.7.egg',
  15. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/Sphinx-1.1.3-py2.7.egg',
  16. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/schooltool.cando-0.7.2dev_r221-py2.7.egg',
  17. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/schooltool.lyceum.journal-2.4.2dev_r378-py2.7.egg',
  18. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/schooltool.gradebook-2.4.3dev_r569-py2.7.egg',
  19. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/schooltool-2.4.3dev_r3593-py2.7.egg',
  20. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/PyVirtualDisplay-0.1.0-py2.7.egg',
  21. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.recipe.testrunner-1.3.0-py2.7.egg',
  22. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.locales-3.7.4-py2.7.egg',
  23. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.traversing-3.14.0-py2.7.egg',
  24. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.testbrowser-4.0.2-py2.7.egg',
  25. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.site-3.9.2-py2.7.egg',
  26. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.security-3.8.3-py2.7-linux-x86_64.egg',
  27. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.schema-3.7.1-py2.7.egg',
  28. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.publisher-3.12.6-py2.7.egg',
  29. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.password-3.6.1-py2.7.egg',
  30. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.i18n-3.8.0-py2.7.egg',
  31. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.container-3.12.0-py2.7-linux-x86_64.egg',
  32. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.component-3.11.0-py2.7.egg',
  33. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.publication-3.14.0-py2.7.egg',
  34. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.dependable-3.5.1-py2.7.egg',
  35. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.debug-3.4.1-py2.7.egg',
  36. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.processlifetime-1.0-py2.7.egg',
  37. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.appsetup-3.16.0-py2.7.egg',
  38. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.annotation-3.6.0-py2.7.egg',
  39. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/docutils-0.7-py2.7.egg',
  40. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/Jinja2-2.6-py2.7.egg',
  41. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/Pygments-1.6-py2.7.egg',
  42. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.i18nmessageid-3.5.3-py2.7-linux-x86_64.egg',
  43. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.viewlet-3.7.2-py2.7.egg',
  44. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.location-3.9.1-py2.7.egg',
  45. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.intid-3.7.2-py2.7.egg',
  46. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.formlib-4.2.0-py2.7.egg',
  47. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.cachedescriptors-3.5.1-py2.7.egg',
  48. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.browserpage-4.0.0-py2.7.egg',
  49. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg',
  50. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.table-0.9.0-py2.7.egg',
  51. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/pytz-2013b-py2.7.egg',
  52. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.lifecycleevent-3.7.0-py2.7.egg',
  53. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.keyreference-3.6.4-py2.7.egg',
  54. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.html-2.2.0-py2.7.egg',
  55. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.event-4.0.2-py2.7.egg',
  56. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.componentvocabulary-1.0.1-py2.7.egg',
  57. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.browser-1.3-py2.7.egg',
  58. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.generations-3.6.1-py2.7.egg',
  59. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.form-4.0.2-py2.7.egg',
  60. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.optionstorage-1.0.7-py2.7.egg',
  61. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.form-2.9.1-py2.7.egg',
  62. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/xlwt-0.7.4-py2.7.egg',
  63. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/lxml-3.1.0-py2.7-linux-x86_64.egg',
  64. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.tales-3.5.3-py2.7.egg',
  65. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.size-3.5.0-py2.7.egg',
  66. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.session-3.9.5-py2.7.egg',
  67. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.server-3.8.6-py2.7.egg',
  68. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.securitypolicy-3.7.0-py2.7.egg',
  69. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.proxy-3.6.1-py2.7-linux-x86_64.egg',
  70. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.pagetemplate-4.0.1-py2.7.egg',
  71. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.mimetype-1.3.1-py2.7.egg',
  72. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.login-1.0.0-py2.7.egg',
  73. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.filerepresentation-3.6.1-py2.7.egg',
  74. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.file-0.6.2-py2.7.egg',
  75. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.dublincore-3.8.2-py2.7.egg',
  76. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.contentprovider-3.7.2-py2.7.egg',
  77. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.configuration-3.7.4-py2.7.egg',
  78. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.catalog-3.8.2-py2.7.egg',
  79. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.browsermenu-4.0.0-py2.7.egg',
  80. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.wsgi-3.15.0-py2.7.egg',
  81. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.security-3.7.5-py2.7.egg',
  82. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.schema-3.5.0-py2.7.egg',
  83. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.principalannotation-3.7.1-py2.7.egg',
  84. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.http-3.10.2-py2.7.egg',
  85. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.exception-3.6.3-py2.7.egg',
  86. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.error-3.5.3-py2.7.egg',
  87. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.container-3.9.2-py2.7.egg',
  88. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.component-3.9.3-py2.7.egg',
  89. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.broken-3.6.0-py2.7.egg',
  90. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.basicskin-3.5.1-py2.7.egg',
  91. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.applicationcontrol-3.5.10-py2.7.egg',
  92. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.authentication-3.7.1-py2.7.egg',
  93. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.resourcelibrary-1.3.4-py2.7.egg',
  94. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.datetimewidget-0.7.0-py2.7.egg',
  95. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.catalog-1.5.1-py2.7.egg',
  96. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.template-1.4.1-py2.7.egg',
  97. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.rml-2.0.0-py2.7.egg',
  98. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.macro-1.4.2-py2.7.egg',
  99. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.formui-2.3.0-py2.7.egg',
  100. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/z3c.autoinclude-0.3.4-py2.7.egg',
  101. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/xlrd-0.9.2-py2.7.egg',
  102. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/reportlab-2.6-py2.7-linux-x86_64.egg',
  103. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/Pillow-1.7.6-py2.7-linux-x86_64.egg',
  104. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/PasteScript-1.7.5-py2.7.egg',
  105. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/PasteDeploy-1.5.0-py2.7.egg',
  106. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/entrypoint2-0.0.6-py2.7.egg',
  107. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/EasyProcess-0.1.4-py2.7.egg',
  108. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.recipe.egg-1.3.2-py2.7.egg',
  109. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.buildout-1.7.1-py2.7.egg',
  110. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/mechanize-0.2.5-py2.7.egg',
  111. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.contenttype-3.5.5-py2.7.egg',
  112. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.broken-3.6.0-py2.7.egg',
  113. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.dottedname-3.4.6-py2.7.egg',
  114. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/transaction-1.1.1-py2.7.egg',
  115. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.error-3.7.2-py2.7.egg',
  116. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.datetime-3.4.1-py2.7.egg',
  117. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zdaemon-2.0.7-py2.7.egg',
  118. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/ZConfig-2.9.3-py2.7.egg',
  119. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.lockfile-1.0.2-py2.7.egg',
  120. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.applicationcontrol-3.5.5-py2.7.egg',
  121. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.renderer-3.5.1-py2.7.egg',
  122. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.browserresource-3.12.0-py2.7.egg',
  123. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.tal-3.5.2-py2.7.egg',
  124. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.minmax-1.1.2-py2.7.egg',
  125. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.index-3.6.4-py2.7-linux-x86_64.egg',
  126. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/WebTest-1.3.4-py2.7.egg',
  127. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.principalregistry-3.7.1-py2.7.egg',
  128. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.publisher-3.10.2-py2.7.egg',
  129. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.pagetemplate-3.11.2-py2.7.egg',
  130. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.app.localpermission-3.7.2-py2.7.egg',
  131. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.principalannotation-3.6.1-py2.7.egg',
  132. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.copypastemove-3.8.0-py2.7.egg',
  133. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.deprecation-4.0.0-py2.7.egg',
  134. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zc.i18n-0.7.0-py2.7.egg',
  135. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/pyPdf-1.13-py2.7.egg',
  136. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/Paste-1.7.5.1-py2.7.egg',
  137. '/usr/lib/python2.7',
  138. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/decorator-3.3.3-py2.7.egg',
  139. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/RestrictedPython-3.6.0-py2.7.egg',
  140. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.structuredtext-3.5.1-py2.7.egg',
  141. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/roman-1.4.0-py2.7.egg',
  142. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/WebOb-1.2.3-py2.7.egg',
  143. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.ptresource-3.9.0-py2.7.egg',
  144. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.copy-3.5.0-py2.7.egg',
  145. '/home/pgulley/schooltool_work/schooltool.quiz/eggs/zope.hookable-3.4.1-py2.7-linux-x86_64.egg',
  146. ]
  147.  
  148.  
  149. import os
  150. sys.argv[0] = os.path.abspath(sys.argv[0])
  151. os.chdir('/home/pgulley/schooltool_work/schooltool.quiz/parts/test')
  152. import schooltool.devtools.selenium_recipe
  153. schooltool.devtools.selenium_recipe.default_factory = 'linux_chrome'
  154. schooltool.devtools.selenium_recipe.implicit_wait = 1.000000
  155.  
  156.  
  157. import schooltool.devtools.webdriver
  158. schooltool.devtools.selenium_recipe.factories['linux_chrome'] =\
  159. lambda config=None: schooltool.devtools.webdriver.ChromeWebDriver(desired_capabilities={'platform': 'ANY', 'browserName': 'chrome', 'version': '', 'chrome.binary': '/usr/lib/chromium-browser/chromium-browser', 'javascriptEnabled': True}, executable_path='/usr/bin/chromedriver', config=config)
  160.  
  161.  
  162. import schooltool.devtools.selenium_recipe
  163.  
  164. import optparse
  165. import zope.testrunner.options
  166. import zope.testrunner.runner
  167.  
  168. selenium_options = optparse.OptionGroup(
  169. zope.testrunner.options.parser,
  170. "Selenium", """Additional options for Selenium tests.
  171. """)
  172.  
  173. selenium_options.add_option(
  174. '--selenium-headless', action="store_true", dest='selenium_headless',
  175. help="""Run headless, under a virtual display.
  176. """)
  177.  
  178.  
  179. selenium_options.add_option(
  180. '--selenium-headless-backend', action="store", type="string",
  181. dest='selenium_headless_backend',
  182. help="""Select virtual display backend: xvfb, xvnc, xephyr.
  183. """)
  184.  
  185. zope.testrunner.options.parser.set_default(
  186. 'selenium_headless_backend', None)
  187.  
  188. selenium_options.add_option(
  189. '--selenium-headless-width', action="store", type="int",
  190. dest='selenium_headless_width')
  191.  
  192. zope.testrunner.options.parser.set_default(
  193. 'selenium_headless_width', 1024)
  194.  
  195. selenium_options.add_option(
  196. '--selenium-headless-height', action="store", type="int",
  197. dest='selenium_headless_height')
  198.  
  199. zope.testrunner.options.parser.set_default(
  200. 'selenium_headless_height', 768)
  201.  
  202. selenium_options.add_option(
  203. '--selenium-browser', action="store", type="string", dest='selenium_browser',
  204. help="""Specify the browser to run the tests with.
  205. Currently available configurations: %s.
  206. """ % (', '.join(schooltool.devtools.selenium_recipe.factories.keys()) or 'none'))
  207.  
  208. zope.testrunner.options.parser.set_default(
  209. 'selenium_browser', schooltool.devtools.selenium_recipe.default_factory)
  210.  
  211. selenium_options.add_option(
  212. '--selenium-screenshots-dir', action="store", type="string",
  213. dest='selenium_screenshots_dir',
  214. help="""Store screenshots here.
  215. Directory will be created if not found.
  216. If not specified, no screenshots will be taken.
  217. """)
  218.  
  219. selenium_options.add_option(
  220. '--selenium-screenshots-url', action="store", type="string",
  221. dest='selenium_screenshots_url',
  222. help="""External URL to screenshots directory. Use file:// if not specified.
  223. """)
  224.  
  225. selenium_options.add_option(
  226. '--selenium-overwrite-screenshots', action="store_true", dest='selenium_overwrite',
  227. help="""Overwrite existing files when taking screenshots.
  228. """)
  229.  
  230. selenium_options.add_option(
  231. '--selenium-downloads-dir', action="store", type="string",
  232. dest='selenium_downloads_dir',
  233. help="""Store downloads here.
  234. Directory will be created if not found.
  235. If not specified, no downloads will be taken.
  236. """)
  237.  
  238. selenium_options.add_option(
  239. '--selenium-downloads-url', action="store", type="string",
  240. dest='selenium_downloads_url',
  241. help="""External URL to downloads directory. Use file:// if not specified.
  242. """)
  243.  
  244. zope.testrunner.options.parser.add_option_group(selenium_options)
  245.  
  246. # Replace the default Zope test runner
  247. zope.testrunner.runner.Runner = schooltool.devtools.selenium_recipe.Runner
  248.  
  249. import zope.testrunner
  250.  
  251. if __name__ == '__main__':
  252. sys.exit(zope.testrunner.run((['--tests-pattern', '^f?s?tests$', '-v', '--auto-color']) + [
  253. '--test-path', '/home/pgulley/schooltool_work/schooltool.quiz/src',
  254. ]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement