<commit_before>import os
import pytest

from ...tests import test_functions
from ...tests.test_tex_files import run_tex_tests as rtt


def setup():
    # Set up the environment.
    this_dir = os.path.dirname(os.path.abspath(__file__))

    (path_to_tests, _) = os.path.split(this_dir)
    test_functions.set_path_to_tests(path_to_tests)
    if not os.path.isdir('temp'):
        os.mkdir('temp')


@pytest.mark.parametrize("name, test_type", [
    ('spatial', 'body'),
    ('qual', 'apdx-validation'),
    ('groups', 'macros'),
    ('groups', 'apdx-validation'),
    ('groups', 'body'),
    ('unknown_type', 'apdx-validation'),
    ('test_sidrefs', 'apdx-validation'),
    ('test_sidrefs', 'body'),
    ('test_lists', 'apdx-validation'),
    ('test_lists', 'body'),
    ('test_att', 'apdx-validation'),
])
def test_tex(name, test_type):
    assert rtt.run_test(name, test_type) == 0<commit_msg>- skip tex tests on py27<commit_after>import os
import sys
import pytest

from ...tests import test_functions
from ...tests.test_tex_files import run_tex_tests as rtt


def setup():
    # Set up the environment.
    this_dir = os.path.dirname(os.path.abspath(__file__))

    (path_to_tests, _) = os.path.split(this_dir)
    test_functions.set_path_to_tests(path_to_tests)
    if not os.path.isdir('temp'):
        os.mkdir('temp')

@pytest.mark.skipif(sys.version_info < (3,6),
                    reason="requires python3.6")
@pytest.mark.parametrize("name, test_type", [
    ('spatial', 'body'),
    ('qual', 'apdx-validation'),
    ('groups', 'macros'),
    ('groups', 'apdx-validation'),
    ('groups', 'body'),
    ('unknown_type', 'apdx-validation'),
    ('test_sidrefs', 'apdx-validation'),
    ('test_sidrefs', 'body'),
    ('test_lists', 'apdx-validation'),
    ('test_lists', 'body'),
    ('test_att', 'apdx-validation'),
])
def test_tex(name, test_type):
    assert rtt.run_test(name, test_type) == 0
{'fraction_non_alphanumeric': 0.1783840503672613, 'fraction_numerical': 0.004197271773347324, 'mean_word_length': 3.9276485788113695, 'pattern_counts': {'":': 0, '<': 4, '<?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': '7309851', 'n_tokens_mistral': 689, 'n_tokens_neox': 674, 'n_words': 130}