<commit_before># -*- coding: utf-8 -*-
#
import pytest

import meshio

import helpers


@pytest.mark.parametrize('filename', [
    'test.e',
    'test.med',
    'test.mesh',
    'test.msh',
    'test.xml',
    'test.post.gz',
    'test.h5m',
    'test.off',
    'test.vtk',
    'test.vtu',
    'test.xmf',
    ])
def test_generic_io(filename):
    meshio.write(
            'test.vtk',
            helpers.tri_mesh['points'],
            helpers.tri_mesh['cells'],
            )

    points, cells, _, _, _ = meshio.helpers.read('test.vtk')
    assert (abs(points - helpers.tri_mesh['points']) < 1.0e-15).all()
    assert (
        helpers.tri_mesh['cells']['triangle'] == cells['triangle']
        ).all()
    return<commit_msg>broader helper tests<commit_after># -*- coding: utf-8 -*-
#
import pytest

import meshio

import helpers


@pytest.mark.parametrize('filename', [
    # 'test.e',
    'test.med',
    'test.mesh',
    'test.msh',
    'test.xml',
    # 'test.post.gz',
    'test.h5m',
    'test.off',
    # 'test.vtk',
    'test.vtu',
    'test.xmf',
    ])
def test_generic_io(filename):
    meshio.write(
            filename,
            helpers.tri_mesh['points'],
            helpers.tri_mesh['cells'],
            )

    points, cells, _, _, _ = meshio.helpers.read('test.vtk')
    assert (abs(points - helpers.tri_mesh['points']) < 1.0e-15).all()
    assert (
        helpers.tri_mesh['cells']['triangle'] == cells['triangle']
        ).all()
    return
{'fraction_non_alphanumeric': 0.18788291354663036, 'fraction_numerical': 0.008168822328114363, 'mean_word_length': 2.2739420935412027, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '769965', 'n_tokens_mistral': 549, 'n_tokens_neox': 538, 'n_words': 79}