<commit_before>"""Project-wide test configuration, including fixutres that can be
used by any module.

Example test: ::

    def test_my_renderer(fakefile):
        assert my_renderer(fakefile) == '..expected result..'

"""
import io
import pytest

@pytest.fixture
def fakefile():
    return io.BytesIO(b'foo')<commit_msg>Make fakefile a mock instead of an io object<commit_after>"""Project-wide test configuration, including fixutres that can be
used by any module.

Example test: ::

    def test_my_renderer(fakefile):
        assert my_renderer(fakefile) == '..expected result..'

"""
import pytest
import mock

@pytest.fixture
def fakefile():
    """A simple file-like object."""
    return mock.Mock(spec=file)
{'fraction_non_alphanumeric': 0.11592178770949721, 'fraction_numerical': 0.0, 'mean_word_length': 4.233576642335766, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5766476', 'n_tokens_mistral': 217, 'n_tokens_neox': 222, 'n_words': 69}