File: __init__.py

package info (click to toggle)
twill 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,472 kB
  • ctags: 1,916
  • sloc: python: 12,686; java: 98; makefile: 18; sh: 2
file content (19 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import twilltestlib
import twilltestserver

def setup(package):
    twilltestlib.cd_testdir()
    twilltestlib.run_server(twilltestserver.create_publisher)

    url = twilltestlib.get_url()

    from twill.commands import go, find
    try:
        go(url)
        find("These are the twill tests")
    except:
        raise Exception("\n\n***\n\nHello! The twill test server is not running or cannot be reached; please free port 8080 (or set TWILL_TEST_PORT to something else), and clear your proxy settings too!\n\n***\n\n")

def teardown(package):
    twilltestlib.kill_server()
    twilltestlib.pop_testdir()