<commit_before>from .helper_functions import *
from .ext_service import *

# ==============================
# Test helper functions
# ==============================

def test_parse_filename():
    example_names = [
        'bezav_pvol_20151009T0000Z.h5',
        'ukjer_pvol_20151010T0000Z.h5',
        'dkste_vp_20151010T0000Z.h5'
    ]
    results = [
        {'radar_name': 'bezav', 'data_type': 'pvol', 'date_time': '20151009T0000Z'},
        {'radar_name': 'ukjer', 'data_type': 'pvol', 'date_time': '20151010T0000Z'},
        {'radar_name': 'dkste', 'data_type': 'vp', 'date_time': '20151010T0000Z'},
    ]
    for i, name in enumerate(example_names):
        expected_result = results[i]
        result = parse_filename(name)
        for key in ['radar_name', 'data_type', 'date_time']:
            assert result[key] == expected_result[key]



# ==============================
# Test connectors with external services
# ==============================

def test_list_files_from_github():
    gc = GithubConnector(repo_username='adokter', repo_name='ODIM-hdf5-test', paths=['vp'])
    for f in gc.list_files():
        print(f)
<commit_msg>add comment to dummy test<commit_after>from .helper_functions import *
from .ext_service import *

# ==============================
# Test helper functions
# ==============================

def test_parse_filename():
    example_names = [
        'bezav_pvol_20151009T0000Z.h5',
        'ukjer_pvol_20151010T0000Z.h5',
        'dkste_vp_20151010T0000Z.h5'
    ]
    results = [
        {'radar_name': 'bezav', 'data_type': 'pvol', 'date_time': '20151009T0000Z'},
        {'radar_name': 'ukjer', 'data_type': 'pvol', 'date_time': '20151010T0000Z'},
        {'radar_name': 'dkste', 'data_type': 'vp', 'date_time': '20151010T0000Z'},
    ]
    for i, name in enumerate(example_names):
        expected_result = results[i]
        result = parse_filename(name)
        for key in ['radar_name', 'data_type', 'date_time']:
            assert result[key] == expected_result[key]



# ==============================
# Test connectors with external services
# ==============================

def test_list_files_from_github():
    """
    This test contains no assertions. It's obviously not a great test. It prints out the files returned
    by the GithubConnector so you can manually check this.
    :return:
    """
    gc = GithubConnector(repo_username='adokter', repo_name='ODIM-hdf5-test', paths=['vp'])
    for f in gc.list_files():
        print(f)

{'fraction_non_alphanumeric': 0.21875, 'fraction_numerical': 0.060897435897435896, 'mean_word_length': 3.9445544554455445, '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': '5184438', 'n_tokens_mistral': 920, 'n_tokens_neox': 802, 'n_words': 167}