<commit_before>import os

from webdriver_manager.config import Configuration

expect_mz_latest = 'https://api.github.com/repos/mozilla/geckodriver/releases/latest'
expect_mz_tag = 'https://api.github.com/repos/mozilla/geckodriver/releases/tags/{0}'
expect_gh_token = ''


def test_config_with_deafault_params():
    config = Configuration(config_folder=os.path.dirname(__file__), section="GeckoDriver")
    assert config.driver_latest_release_url == expect_mz_latest
    assert config.mozila_release_tag == expect_mz_tag
    assert config.gh_token == expect_gh_token


def test_config_variables_with_default_params():
    config = Configuration(section="GeckoDriver")
    assert config.gh_token == ''
    assert config.driver_latest_release_url == expect_mz_latest
    assert config.mozila_release_tag == expect_mz_tag


def test_config_with_custom_file():
    config = Configuration(config_folder=os.path.dirname(__file__), file_name="wd_config.ini", section="GeckoDriver")
    assert config.gh_token == "<PASSWORD>"
    assert config.driver_latest_release_url == "test_release"<commit_msg>test config tests fix<commit_after>import os

from webdriver_manager.config import Configuration

expect_mz_latest = 'https://api.github.com/repos/mozilla/geckodriver/releases/latest'
expect_mz_tag = 'https://api.github.com/repos/mozilla/geckodriver/releases/tags/{0}'
expect_gh_token = ''


def test_config_with_deafault_params():
    config = Configuration(config_folder=os.path.dirname(__file__), section="GeckoDriver", file_name="config.ini")
    assert config.driver_latest_release_url == expect_mz_latest
    assert config.mozila_release_tag == expect_mz_tag
    assert config.gh_token == expect_gh_token


def test_config_variables_with_default_params():
    config = Configuration(section="GeckoDriver", file_name="",config_folder="")
    assert config.gh_token == ''
    assert config.driver_latest_release_url == expect_mz_latest
    assert config.mozila_release_tag == expect_mz_tag


def test_config_with_custom_file():
    config = Configuration(config_folder=os.path.dirname(__file__), file_name="wd_config.ini", section="GeckoDriver")
    assert config.gh_token == "<PASSWORD>"
    assert config.driver_latest_release_url == "test_release"
{'fraction_non_alphanumeric': 0.10556792873051225, 'fraction_numerical': 0.0008908685968819599, 'mean_word_length': 6.363934426229508, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '5279597', 'n_tokens_mistral': 722, 'n_tokens_neox': 693, 'n_words': 102}