<commit_before>"""
Tests for the BSE exposed API
"""

import bse
import pytest

def test_get_basis_set():
    bs_metadata = bse.get_metadata()
    formats = bse.get_formats()

    for basis_name in bs_metadata.keys():
        # Test combinations of contration options
        unc_comb = [(False, False, False),
                    (False, False, True),
                    (False, True, False),
                    (False, True, True),
                    (True, False, False),
                    (True, False, True),
                    (True, True, False),
                    (True, True, True)]

        # TODO - test getting subsets of elements
        for f in formats:
            for unc in unc_comb:
                bse.get_basis_set(basis_name, elements=None, fmt=f,
                                  uncontract_general=unc[0],
                                  uncontract_segmented=unc[0],
                                  uncontract_spdf=unc[0])



def test_get_references():
    bs_metadata = bse.get_metadata()<commit_msg>Fix indices in test_api<commit_after>"""
Tests for the BSE exposed API
"""

import bse
import pytest

def test_get_basis_set():
    bs_metadata = bse.get_metadata()
    formats = bse.get_formats()

    for basis_name in bs_metadata.keys():
        # Test combinations of contration options
        unc_comb = [(False, False, False),
                    (False, False, True),
                    (False, True, False),
                    (False, True, True),
                    (True, False, False),
                    (True, False, True),
                    (True, True, False),
                    (True, True, True)]

        # TODO - test getting subsets of elements
        for f in formats:
            for unc in unc_comb:
                bse.get_basis_set(basis_name, elements=None, fmt=f,
                                  uncontract_general=unc[0],
                                  uncontract_segmented=unc[1],
                                  uncontract_spdf=unc[2])



def test_get_references():
    bs_metadata = bse.get_metadata()
{'fraction_non_alphanumeric': 0.09300095877277086, 'fraction_numerical': 0.0028763183125599234, 'mean_word_length': 1.5144578313253012, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6371918', 'n_tokens_mistral': 596, 'n_tokens_neox': 553, 'n_words': 152}