Source

repoman / tests / output / serve.py

Full commit
import os
import re
import urllib2

from tests.pytest import run, Quiet

cwd = os.getcwd()
os.chdir('../forest1')
try:
    with Quiet() as _:
        proc = run('serve', background=True, daemon=True)
        proc.join(1)
        retval = urllib2.urlopen('http://localhost:8000/').read()
    print sorted(m.group(1) for m in re.finditer(r'<b>([^<]+)</b>', retval))
finally:
    os.chdir(cwd)