<commit_before>#!/usr/bin/env python

import os
import glob
import subprocess as sp
import argparse
import sys

import nose

PYTHON_VERSIONS = ["27", "34"]


def build_recipe(recipe):
    try:
        os.environ["CONDA_NPY"] = "18"
        for py in PYTHON_VERSIONS:
            os.environ["CONDA_PY"] = py
            sp.check_output(["conda", "build", "--no-anaconda-upload",
                             "--skip-existing", recipe],
                            stderr=sp.STDOUT)
    except sp.CalledProcessError as e:
        print(e.output)
        assert False


def test_recipes():
    if args.packages:
        recipes = [os.path.join(args.repository, "recipes", package)
                   for package in args.packages]
    else:
        recipes = list(glob.glob(os.path.join(args.repository, "recipes",
                                              "*")))

    for recipe in recipes:
        yield build_recipe, recipe

    if os.environ.get("TRAVIS_BRANCH") == "master" and os.environ.get(
        "TRAVIS_PULL_REQUEST") == "false":
        for recipe in recipes:
            packages = set()<commit_msg>Hide conda progress bar and decode error string.<commit_after>#!/usr/bin/env python

import os
import glob
import subprocess as sp
import argparse
import sys

import nose

PYTHON_VERSIONS = ["27", "34"]


def build_recipe(recipe):
    try:
        os.environ["CONDA_NPY"] = "18"
        for py in PYTHON_VERSIONS:
            os.environ["CONDA_PY"] = py
            sp.check_output(["conda", "build", "--no-anaconda-upload",
                             "--skip-existing", "--quiet", recipe],
                            stderr=sp.STDOUT)
    except sp.CalledProcessError as e:
        print(e.output.decode())
        assert False


def test_recipes():
    if args.packages:
        recipes = [os.path.join(args.repository, "recipes", package)
                   for package in args.packages]
    else:
        recipes = list(glob.glob(os.path.join(args.repository, "recipes",
                                              "*")))

    for recipe in recipes:
        yield build_recipe, recipe

    if os.environ.get("TRAVIS_BRANCH") == "master" and os.environ.get(
        "TRAVIS_PULL_REQUEST") == "false":
        for recipe in recipes:
            packages = set()
{'fraction_non_alphanumeric': 0.1188075405523893, 'fraction_numerical': 0.00526085050416484, 'mean_word_length': 1.9597924773022048, 'pattern_counts': {'":': 2, '<': 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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7026427', 'n_tokens_mistral': 695, 'n_tokens_neox': 685, 'n_words': 165}