<commit_before>import click
import logbook

from ..app import build_app
from ..bootstrapping import ensure_project_bootstrapped

_logger = logbook.Logger(__name__)


@click.command()
@click.option('-p', '--port', type=int, default=5000)
@click.option('--debug/--no-debug', is_flag=True, default=True)
def testserver(port, debug):
    ensure_project_bootstrapped()
    flask_app = build_app()
    flask_app.run(port=port, debug=debug)<commit_msg>Override flask configuration when running 'cob testserver' (fix #55)<commit_after>import click
import logbook

from ..app import build_app
from ..bootstrapping import ensure_project_bootstrapped

_logger = logbook.Logger(__name__)


@click.command()
@click.option('-p', '--port', type=int, default=5000)
@click.option('--debug/--no-debug', is_flag=True, default=True)
def testserver(port, debug):
    ensure_project_bootstrapped()
    flask_app = build_app(config_overrides={'TESTING': True, 'DEBUG': debug})
    flask_app.run(port=port, debug=debug)
{'fraction_non_alphanumeric': 0.13969849246231156, 'fraction_numerical': 0.010050251256281407, 'mean_word_length': 6.014084507042254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4118358', 'n_tokens_mistral': 337, 'n_tokens_neox': 326, 'n_words': 70}