<commit_before>from __future__ import absolute_import, division, print_function
import os, sys, tempfile

sys.path.append("data/")
import data

try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

def test_check_hashes():
    with tempfile.NamedTemporaryFile() as temp:
        temp.write(b'Some data')
        temp.flush()
        fname = temp.name
        d = {fname: "5b82f8bf4df2bfb0e66ccaa7306fd024"}
        assert data.check_hashes(d)
        d = {fname: "4b82f8bf4df2bfb0e66ccaa7306fd024"}
        assert not data.check_hashes(d)

def test_make_hash_dict():
    l = "http://www.jarrodmillman.com/rcsds/_downloads/ds107_sub001_highres.nii"
    with open("ds107_sub001_highres.nii", 'wb') as outfile:<commit_msg>Fix build exitting from make coverage<commit_after>from __future__ import absolute_import, division, print_function
import os, sys, tempfile

from data import data

try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

def test_check_hashes():
    with tempfile.NamedTemporaryFile() as temp:
        temp.write(b'Some data')
        temp.flush()
        fname = temp.name
        d = {fname: "5b82f8bf4df2bfb0e66ccaa7306fd024"}
        assert data.check_hashes(d)
        d = {fname: "4b82f8bf4df2bfb0e66ccaa7306fd024"}
        assert not data.check_hashes(d)

def test_make_hash_dict():
    l = "http://www.jarrodmillman.com/rcsds/_downloads/ds107_sub001_highres.nii"
    with open("ds107_sub001_highres.nii", 'wb') as outfile:
{'fraction_non_alphanumeric': 0.09458577951728636, 'fraction_numerical': 0.05870841487279843, 'mean_word_length': 3.8238993710691824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '81407', 'n_tokens_mistral': 595, 'n_tokens_neox': 554, 'n_words': 115}