Klaus Demo ~jonashaag/klaus / af7f32f
Travis Jonas Haag 7 years ago
2 changed file(s) with 15 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 language: python
1 python:
2 - "2.6"
3 - "2.7"
4 install:
5 - "pip install ."
6 - "pip install requests"
7 script:
8 - git config --global user.email "you@example.com"
9 - git config --global user.name "Your Name"
10 - ./runtests.sh
00 import os
1 import time
12 import contextlib
23 import subprocess
34 import tempfile
3334 app = klaus.make_app([TEST_REPO], TEST_SITE_NAME, *args, **kwargs)
3435 server = werkzeug.serving.make_server("localhost", 9876, app)
3536 thread = threading.Thread(target=server.serve_forever)
36 thread.daemon = True
3737 thread.start()
3838 try:
3939 yield
4040 finally:
4141 server.server_close()
42 if 'TRAVIS' in os.environ:
43 # This fixes some "Address already in use" cases on Travis.
44 time.sleep(0.3)
4245
4346
4447 def testserver_require_auth(*args, **kwargs):