<commit_before># -*- coding: utf-8 -*-
import glob
import os

from lettuce import *
from splinter import Browser
from django.core.management import call_command
from django.conf import settings

from django.template.defaultfilters import slugify
from survey.models.backend import Backend


@before.each_scenario
def flush_database(step):
    call_command('flush', interactive=False)
    create_backends()


@before.all
def clear_screenshots():
    screenshots = glob.glob('./screenshots/*.png')
    for screenshot in screenshots:
        os.remove(screenshot)
    open_browser()


def open_browser():
    world.browser = Browser("phantomjs")


@after.each_scenario
def take_screenshot(scenario):
    if scenario.failed:
        world.browser.driver.save_screenshot('screenshots/%s.png' % slugify(scenario.name))


@after.each_scenario
def clear_cookies(scenario):
    world.browser.cookies.delete()


@after.all
def close_browser(total):<commit_msg>added maximize window -- fixing build<commit_after># -*- coding: utf-8 -*-
import glob
import os

from lettuce import *
from splinter import Browser
from django.core.management import call_command
from django.conf import settings

from django.template.defaultfilters import slugify
from survey.models.backend import Backend


@before.each_scenario
def flush_database(step):
    call_command('flush', interactive=False)
    create_backends()


@before.all
def clear_screenshots():
    screenshots = glob.glob('./screenshots/*.png')
    for screenshot in screenshots:
        os.remove(screenshot)
    open_browser()


def open_browser():
    world.browser = Browser("phantomjs")
    world.browser.driver.maximize_window()


@after.each_scenario
def take_screenshot(scenario):
    if scenario.failed:
        world.browser.driver.save_screenshot('screenshots/%s.png' % slugify(scenario.name))


@after.each_scenario
def clear_cookies(scenario):
    world.browser.cookies.delete()


@after.all
def close_browser(total):
{'fraction_non_alphanumeric': 0.10534351145038168, 'fraction_numerical': 0.0010178117048346056, 'mean_word_length': 4.649425287356322, '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': '6320506', 'n_tokens_mistral': 625, 'n_tokens_neox': 589, 'n_words': 134}