<commit_before>import nose
from nose.tools import assert_raises
from bluesky.hardware_checklist import *


def test_connect_mds_mongodb():
    try:
        import metadatastore
    except ImportError:
        raise nose.SkipTest
    from metadatastore.utils.testing import mds_setup, mds_teardown
    try:
        mds_setup()
        connect_mds_mongodb()
    except:
        raise
    finally:
        mds_teardown()


def test_connect_fs_mongodb():
    try:
        import filestore
    except ImportError:
        raise nose.SkipTest
    from filestore.utils.testing import fs_setup, fs_teardown
    try:
        fs_setup()
        connect_fs_mongodb()
    except:
        raise
    finally:
        fs_teardown()<commit_msg>TST: Unless we insert something, db is not created.<commit_after>import uuid
import nose
from nose.tools import assert_raises
from bluesky.hardware_checklist import *


def test_connect_mds_mongodb():
    try:
        import metadatastore
    except ImportError:
        raise nose.SkipTest
    from metadatastore.utils.testing import mds_setup, mds_teardown
    from metadatastore.commands import insert_beamline_config
    try:
        mds_setup()
        # Until we insert something, the db is not actually created.
        bc = insert_beamline_config({}, time=0., uid=str(uuid.uuid4()))
        connect_mds_mongodb()
    except:
        raise
    finally:
        mds_teardown()


def test_connect_fs_mongodb():
    try:
        import filestore
    except ImportError:
        raise nose.SkipTest
    from filestore.utils.testing import fs_setup, fs_teardown
    try:
        fs_setup()
        connect_fs_mongodb()
    except:
        raise
    finally:
        fs_teardown()
{'fraction_non_alphanumeric': 0.0620245757753072, 'fraction_numerical': 0.0011702750146284377, 'mean_word_length': 2.6382978723404253, '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': '5512822', 'n_tokens_mistral': 542, 'n_tokens_neox': 532, 'n_words': 129}