jeanphix/Ghost.py — pull request #20 by msabramo (2012-07-10 06:29:54+00:00)
Title: Add tox.ini for tox (http://tox.testrun.org/)

Sample tox output:

```
~/dev/git-repos/ghostpy$ tox
GLOB sdist-make: /Users/marca/dev/git-repos/ghostpy/setup.py
py27 sdist-reinst: /Users/marca/dev/git-repos/ghostpy/.tox/dist/Ghost.py-0.1b.zip
py27 runtests: commands[0]
Requirement already satisfied (use --upgrade to upgrade): Flask in ./.tox/py27/lib/python2.7/site-packages (from -r /Users/marca/dev/git-repos/ghostpy/tests/requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in ./.tox/py27/lib/python2.7/site-packages (from Flask->-r /Users/marca/dev/git-repos/ghostpy/tests/requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in ./.tox/py27/lib/python2.7/site-packages (from Flask->-r /Users/marca/dev/git-repos/ghostpy/tests/requirements.txt (line 1))
Cleaning up...
py27 runtests: commands[1]
test_basic_http_auth_error (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET /basic-auth HTTP/1.1" 401 90
localhost - - [09/Jul/2012 23:27:39] "GET /basic-auth HTTP/1.1" 401 90
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/basic-auth 401
ok
test_basic_http_auth_success (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET /basic-auth HTTP/1.1" 401 90
localhost - - [09/Jul/2012 23:27:39] "GET /basic-auth HTTP/1.1" 401 90
localhost - - [09/Jul/2012 23:27:39] "GET /basic-auth HTTP/1.1" 200 33
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/basic-auth 200
ok
test_capture_selector_to (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_capture_to (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_click_link (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
localhost - - [09/Jul/2012 23:27:39] "GET /form HTTP/1.1" 200 1756
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 200
ok
test_confirm (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:39] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: confirm('this is a confirm')
INFO:ghost:Frame: alert('you confirmed!')
ok
test_confirm_callback (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: confirm('this is a confirm')
INFO:ghost:Frame: alert('you denied!')
ok
test_cookies (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /cookie HTTP/1.1" 200 13
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/cookie 200
ok
test_delete_cookies (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /cookie HTTP/1.1" 200 13
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/cookie 200
ok
test_evaluate (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_external_api (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /mootools HTTP/1.1" 200 864
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/mootools 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
ok
test_fill (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /form HTTP/1.1" 200 1756
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 200
ok
test_form_submission (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /form HTTP/1.1" 200 1756
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 200
localhost - - [09/Jul/2012 23:27:40] "POST /form HTTP/1.1" 302 217
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 302
localhost - - [09/Jul/2012 23:27:40] "GET /form HTTP/1.1" 200 1756
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 200
ok
test_global_exists (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_http_status (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /redirect-me HTTP/1.1" 302 209
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/redirect-me 302
localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
localhost - - [09/Jul/2012 23:27:40] "GET /404 HTTP/1.1" 404 238
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/404 404
ok
test_no_confirm (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: confirm('this is a confirm')
INFO:ghost:Frame: alert('you denied!')
ok
test_open (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_prompt (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: prompt('Prompt ?')
ok
test_prompt_callback (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: prompt('Prompt ?')
ok
test_region_for_selector (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_resource_headers (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok
test_set_field_value (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /form HTTP/1.1" 200 1756
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/form 200
ok
test_set_simple_file_field (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /upload HTTP/1.1" 200 475
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/upload 200
localhost - - [09/Jul/2012 23:27:40] "POST /upload HTTP/1.1" 302 221
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/upload 302
localhost - - [09/Jul/2012 23:27:40] "GET /upload HTTP/1.1" 200 475
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/upload 200
ok
test_wait_for_alert (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /alert HTTP/1.1" 200 1366
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/alert 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
INFO:ghost:Frame: alert('this is an alert')
ok
test_wait_for_selector (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /mootools HTTP/1.1" 200 864
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/mootools 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
localhost - - [09/Jul/2012 23:27:40] "GET /items.json HTTP/1.1" 200 40
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/items.json 200
ok
test_wait_for_text (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET /mootools HTTP/1.1" 200 864
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/mootools 200
localhost - - [09/Jul/2012 23:27:40] "GET /static/mootools.js HTTP/1.1" 200 155263
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/static/mootools.js 200
localhost - - [09/Jul/2012 23:27:40] "GET /items.json HTTP/1.1" 200 40
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/items.json 200
ok
test_wait_for_timeout (__main__.GhostTest) ... localhost - - [09/Jul/2012 23:27:40] "GET / HTTP/1.1" 200 276
INFO:ghost:Ghost: Resource loaded: http://localhost:5000/ 200
ok

----------------------------------------------------------------------
Ran 27 tests in 6.758s

OK
_________________________________________________________________________ summary __________________________________________________________________________
py27: commands succeeded
congratulations :)
```