<commit_before># Copyright (c) 2016 <NAME>
# =======================================================================
#  Distributed under the MIT License.
#  (See accompanying file LICENSE or copy at
#  http://opensource.org/licenses/MIT)
# =======================================================================
"""
Integration tests for features in eppy.runner related to running EnergyPlus
from Eppy. These tests will fail unless run on a system with EnergyPlus 
installed in the default location.

"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from glob import glob
import multiprocessing
import os
import re
import shutil
from subprocess import CalledProcessError

from concurrent import futures

from eppy.runner.run_functions import EPLUS_WEATHER
from eppy.runner.run_functions import VERSION
from eppy.runner.run_functions import multirunner
from eppy.runner.run_functions import run
from eppy.runner.run_functions import runIDFs
from eppy.runner.runner import IDF6


THIS_DIR = os.path.dirname(os.path.abspath(__file__))
IDD_FILES = os.path.join(THIS_DIR, os.pardir, 'resources/iddfiles')
IDF_FILES = os.path.join(THIS_DIR, os.pardir, 'resources/idffiles')

TEST_IDF = "V{}/smallfile.idf".format(VERSION[:3].replace('-', '_'))
TEST_EPW = 'USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw'
TEST_IDD = "Energy+V{}.idd".format(VERSION.replace('-', '_'))
TEST_OLD_IDD = 'Energy+V8_1_0.idd'


def has_severe_errors(results='run_outputs'):
    """Check for severe errors in the eplusout.end file.
    """
    end_filename = glob('{}/*.end'.format(results))[0]
    with open(os.path.join(end_filename), 'r') as end_file:
        end_txt = end_file.read()
    num_severe = int(re.findall(r' (\d*) Severe Error', end_txt)[0])
    return num_severe > 0


class TestRunFunction(object):<commit_msg>Remove import of futures from test_runner.py<commit_after># Copyright (c) 2016 <NAME>
# =======================================================================
#  Distributed under the MIT License.
#  (See accompanying file LICENSE or copy at
#  http://opensource.org/licenses/MIT)
# =======================================================================
"""
Integration tests for features in eppy.runner related to running EnergyPlus
from Eppy. These tests will fail unless run on a system with EnergyPlus 
installed in the default location.

"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

from glob import glob
import multiprocessing
import os
import re
import shutil
from subprocess import CalledProcessError

from eppy.runner.run_functions import EPLUS_WEATHER
from eppy.runner.run_functions import VERSION
from eppy.runner.run_functions import multirunner
from eppy.runner.run_functions import run
from eppy.runner.run_functions import runIDFs
from eppy.runner.runner import IDF6


THIS_DIR = os.path.dirname(os.path.abspath(__file__))
IDD_FILES = os.path.join(THIS_DIR, os.pardir, 'resources/iddfiles')
IDF_FILES = os.path.join(THIS_DIR, os.pardir, 'resources/idffiles')

TEST_IDF = "V{}/smallfile.idf".format(VERSION[:3].replace('-', '_'))
TEST_EPW = 'USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw'
TEST_IDD = "Energy+V{}.idd".format(VERSION.replace('-', '_'))
TEST_OLD_IDD = 'Energy+V8_1_0.idd'


def has_severe_errors(results='run_outputs'):
    """Check for severe errors in the eplusout.end file.
    """
    end_filename = glob('{}/*.end'.format(results))[0]
    with open(os.path.join(end_filename), 'r') as end_file:
        end_txt = end_file.read()
    num_severe = int(re.findall(r' (\d*) Severe Error', end_txt)[0])
    return num_severe > 0


class TestRunFunction(object):
{'fraction_non_alphanumeric': 0.1750460647538826, 'fraction_numerical': 0.010002632271650434, 'mean_word_length': 5.73758865248227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4706804', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1161, 'n_words': 308}