<commit_before>from behave import *
from app import payments
from app.db import app_db

def before_all(context):

    ''' 
        this db stuff should go somewhere else
        refactor will be another issue
    '''
    payments.app.debug = True
    payments.app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://payments:payments@localhost:5432/test'
    app_db.drop_all()    # clean up the last tests
    app_db.create_all()  # make our sqlalchemy tables
    
    context.app = payments.app.test_client()
    context.server = payments

def after_all(context):
    app.db.drop_all()
    context.server.shutdown()<commit_msg>quick fix to environment.py<commit_after>from behave import *
from app import payments
from app.db import app_db

def before_all(context):

    ''' 
        this db stuff should go somewhere else
        refactor will be another issue
    '''
    payments.app.debug = True
    payments.app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://payments:payments@localhost:5432/test'
    app_db.drop_all()    # clean up the last tests
    app_db.create_all()  # make our sqlalchemy tables
    app_db.session.commit()
    
    context.app = payments.app.test_client()
    context.server = payments

def after_all(context):
    app_db.drop_all()
{'fraction_non_alphanumeric': 0.0949367088607595, 'fraction_numerical': 0.006329113924050633, 'mean_word_length': 3.3620689655172415, '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': '6165001', 'n_tokens_mistral': 401, 'n_tokens_neox': 392, 'n_words': 98}