<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from utils.eliteprospects_utils import get_player_with_dob


def test_get_player_with_dob():
    # <NAME>
    url = "http://www.eliteprospects.com/player.php?player=199898"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Auston"
    assert plr.last_name == "Matthews"
    assert plr.date_of_birth == "1997-09-17"


def test_get_player_with_alternate_first_and_last_name():
    # <NAME> a.k.a. "<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=9258"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Nikolai"
    assert plr.last_name == "Kulyomin"
    assert plr.date_of_birth == "1986-07-14"
    assert plr.alt_last_name == "Kulemin"


def test_get_player_with_multiple_alternate_last_names():
    # <NAME> a.k.a. "<NAME>, <NAME>"
    url = "http://www.eliteprospects.com/player.php?player=312234"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Igor"
    assert plr.last_name == "Shvyryov"
    assert plr.date_of_birth == "1998-07-10"
    assert plr.alt_last_name == "Shvyrev"


def test_get_player_without_alternate_last_name():
    # <NAME> a.k.a. "<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=9209"
    plr = get_player_with_dob(url)
    assert plr.first_name == "T.J."
    assert plr.last_name == "Oshie"
    assert plr.date_of_birth == "1986-12-23"
    assert plr.alt_last_name == ""

    # <NAME> a.k.a. "<NAME>" (not grasped by function yet)
    url = "http://www.eliteprospects.com/player.php?player=8837"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Freddy"
    assert plr.last_name == "Meyer"
    assert plr.date_of_birth == "1981-01-04"
    assert plr.alt_last_name == ""

    # <NAME> aka. "Nicholas, <NAME>"
    url = "http://www.eliteprospects.com/player.php?player=380612"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Nick"
    assert plr.last_name == "Perbix"
    assert plr.date_of_birth == "1998-06-15"
    assert plr.alt_last_name == ""


def test_get_player_with_alternate_last_name():
    # <NAME> a.k.a. "<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=312680"
    plr = get_player_with_dob(url)
    assert plr.first_name == "<NAME>."
    assert plr.last_name == "Popugayev"
    assert plr.date_of_birth == "1998-11-20"<commit_msg>Adjust test parameters to updated comparison data<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from utils.eliteprospects_utils import get_player_with_dob


def test_get_player_with_dob():
    # <NAME>
    url = "http://www.eliteprospects.com/player.php?player=199898"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Auston"
    assert plr.last_name == "Matthews"
    assert plr.date_of_birth == "1997-09-17"


def test_get_player_with_alternate_first_and_last_name():
    # <NAME> a.k.a. "<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=9258"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Nikolai"
    assert plr.last_name == "Kulyomin"
    assert plr.date_of_birth == "1986-07-14"
    assert plr.alt_last_name == "Kulemin"


def test_get_player_with_multiple_alternate_last_names():
    # <NAME> a.k.a. "<NAME>, Svyrev, Shvyrov"
    url = "http://www.eliteprospects.com/player.php?player=312234"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Igor"
    assert plr.last_name == "Shvyryov"
    assert plr.date_of_birth == "1998-07-10"
    assert plr.alt_last_name == "Shvyrev"


def test_get_player_without_alternate_last_name():
    # <NAME> a.k.a. "Timothy, T<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=9209"
    plr = get_player_with_dob(url)
    assert plr.first_name == "T.J."
    assert plr.last_name == "Oshie"
    assert plr.date_of_birth == "1986-12-23"
    assert plr.alt_last_name == ""

    # <NAME> a.k.a. "<NAME>" (not grasped by function yet)
    url = "http://www.eliteprospects.com/player.php?player=8837"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Freddy"
    assert plr.last_name == "Meyer"
    assert plr.date_of_birth == "1981-01-04"
    assert plr.alt_last_name == ""

    # <NAME> aka. "Nicholas, <NAME>"
    url = "http://www.eliteprospects.com/player.php?player=380612"
    plr = get_player_with_dob(url)
    assert plr.first_name == "Nicklaus"
    assert plr.last_name == "Perbix"
    assert plr.date_of_birth == "1998-06-15"
    assert plr.alt_last_name == ""


def test_get_player_with_alternate_last_name():
    # <NAME> a.k.a. "<NAME>"
    url = "http://www.eliteprospects.com/player.php?player=312680"
    plr = get_player_with_dob(url)
    assert plr.first_name == "<NAME>."
    assert plr.last_name == "Popugayev"
    assert plr.date_of_birth == "1998-11-20"
{'fraction_non_alphanumeric': 0.14790056402757468, 'fraction_numerical': 0.038855232922498435, 'mean_word_length': 3.6530612244897958, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, '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': '3610415', 'n_tokens_mistral': 2079, 'n_tokens_neox': 1936, 'n_words': 301}