Exemplo n.º 1
0
def test_nt_is_nt_online():
    # Test that nT and nT online are the same
    st_online = xenonnt_online(_database_init=False)

    st = xenonnt(_database_init=False)
    for plugin in st._plugin_class_registry.keys():
        print(f'Checking {plugin}')
        nt_key = st.key_for('0', plugin)
        nt_online_key = st_online.key_for('0', plugin)
        assert str(nt_key) == str(nt_online_key)
Exemplo n.º 2
0
def test_offline():
    """
    Let's try and see which CMT versions are compatible with this straxen
    version
    """
    cmt = straxen.CorrectionsManagementServices()
    cmt_versions = list(cmt.global_versions)[::-1]
    print(cmt_versions)
    success_for = []
    for global_version in cmt_versions:
        try:
            xenonnt(global_version)
            success_for.append(global_version)
        except straxen.CMTVersionError:
            pass
    print(f'This straxen version works with {success_for} but is '
          f'incompatible with {set(cmt_versions)-set(success_for)}')

    test = unittest.TestCase()
    # We should always work for one offline and the online version
    test.assertTrue(len(success_for) >= 2)
Exemplo n.º 3
0
def test_offline():
    st = xenonnt('latest')
    st.provided_dtypes()
Exemplo n.º 4
0
def test_xennonnt():
    st = xenonnt(_database_init=False)
    st.search_field('time')
Exemplo n.º 5
0
def test_xennonnt():
    if straxen.utilix_is_configured():
        st = xenonnt(_database_init=False)
        st.search_field('time')