<s> import os <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . dirname ( os . path . dirname ( __file__ ) ) ) <EOL> from webtest import http <EOL> from doctest import SKIP <EOL> from tests . apps import input_app <EOL> PY3 = sys . version_info >= ( <NUM_LIT:3> , ) <EOL> def setup_test ( test ) : <EOL> for example in test . examples : <EOL> if PY3 : <EOL> example . options . setdefault ( SKIP , <NUM_LIT:1> ) <EOL> if not PY3 : <EOL> server = http . StopableWSGIServer . create ( input_app ) <EOL> server . wait ( ) <EOL> path_to_html_file = os . path . join ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> test . globs . update ( <EOL> input_app = input_app , <EOL> server = server , <EOL> your_url = server . application_url . rstrip ( '<STR_LIT:/>' ) + '<STR_LIT>' , <EOL> path_to_html_file = path_to_html_file , <EOL> ) <EOL> setup_test . __test__ = False <EOL> def teardown_test ( test ) : <EOL> if '<STR_LIT>' in test . globs : <EOL> test . globs [ '<STR_LIT>' ] . shutdown ( ) <EOL> teardown_test . __test__ = False </s>
