<commit_before># Test akara.dist.setup()
import sys
import os
import tempfile
import subprocess
import shutil

from akara import dist

class SetupException(Exception):
    pass

def call_setup(args):
    p = subprocess.Popen([sys.executable] + args,
                         stdout = subprocess.PIPE,
                         stderr = subprocess.STDOUT,
                         cwd="setup_scripts/")
    stdout = p.stdout.read()<commit_msg>nosetests can now run in akara/test/ (as it was before) or in the top-level akara/ directory That is, I made the search for the subdirectory no longer be dependent on where nosetests was run<commit_after># Test akara.dist.setup()
import sys
import os
import tempfile
import subprocess
import shutil

from akara import dist

class SetupException(Exception):
    pass

# Do a bit of extra work since nosetests might run in the top-level
# Akara directory or in test/ .
dirname = os.path.dirname(__file__)
setup_scripts_dir = os.path.join(dirname, "setup_scripts")
assert os.path.isdir(setup_scripts_dir), setup_scripts_dir

def call_setup(args):
    p = subprocess.Popen([sys.executable] + args,
                         stdout = subprocess.PIPE,
                         stderr = subprocess.STDOUT,
                         cwd=setup_scripts_dir)
    stdout = p.stdout.read()
{'fraction_non_alphanumeric': 0.07832699619771863, 'fraction_numerical': 0.0, 'mean_word_length': 2.781609195402299, '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': '5769548', 'n_tokens_mistral': 386, 'n_tokens_neox': 375, 'n_words': 122}