<commit_before>import pytest
from .testing import _baseSM
from amostra.basic import SampleReference
from io import StringIO
import json
import yaml


class TestBasic(_baseSM):
    db_class = SampleReference
    args = ()
    kwargs = {}

    def test_disk_round_trip(self):
        db = self.db_class(*self.args, **self.kwargs)
        tt = StringIO()

        def _helper(doc_list):
            db2 = SampleReference(doc_list)
            for doc in db.find():
                doc_id = doc['uid']
                rl_doc = db2.find(uid=doc_id)
                assert doc == rl_doc<commit_msg>WIP:First attempt to get base tests working<commit_after>import pytest
from amostra.testing import _baseSM
from amostra.client.commands import SampleReference
from io import StringIO
import json
import yaml


class TestBasic(_baseSM):
    db_class = SampleReference
    args = ()
    kwargs = {}

    def test_disk_round_trip(self):
        db = self.db_class(*self.args, **self.kwargs)
        tt = StringIO()

        def _helper(doc_list):
            db2 = SampleReference(doc_list)
            for doc in db.find():
                doc_id = doc['uid']
                rl_doc = db2.find(uid=doc_id)
                assert doc == rl_doc
{'fraction_non_alphanumeric': 0.08773354995938261, 'fraction_numerical': 0.003249390739236393, 'mean_word_length': 2.366120218579235, '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': '7360010', 'n_tokens_mistral': 381, 'n_tokens_neox': 364, 'n_words': 97}