WIP: Changes to playerinfo model #53
30 passed, 3 failed and 0 skipped
❌ tests/test-results.xml
33 tests were completed in 13s with 30 passed, 3 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 30✅ | 3❌ | 13s |
❌ pytest
tests.unit.test_aifunctions
✅ test_force_valid_json_string[{'game_length': -1}-{"game_length": -1}]
✅ test_force_valid_json_string[json_input1-{"game_length": -1}]
✅ test_force_valid_json_string[{"game_length": -1}-{"game_length": -1}]
✅ test_force_valid_json_string[-unix_timestamp-{"unix_timestamp": -1}]
✅ test_max_docstring_length[LookupPlayer]
✅ test_max_docstring_length[QueryReplayDB]
✅ test_max_docstring_length[AddMetadata]
✅ test_max_docstring_length[GetCurrentGameInfo]
✅ test_function_meta_wrong_input
✅ test_clean_tag[smurf,cheese,proxy-expected0]
✅ test_clean_tag[smurf , cheese,proxy-expected1]
✅ test_clean_tag[Keywords: smurf-expected2]
✅ test_clean_tag[Keywords: smurf, cheese, proxy-expected3]
✅ test_clean_tag[The essential keywords for this game are: "void ray,charge,colossus,immortal,roach,corruptor,timing". to replay-expected4]
tests.unit.test_config
✅ test_load_config
tests.unit.test_player
❌ test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-zatic-replay_date0-True]
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
✅ test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Different Map-zatic-replay_date1-False]
✅ test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-different opponent-replay_date2-False]
❌ test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-Atreyu-replay_date3-True]
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
✅ test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-Atreyu-replay_date4-False]
✅ test_match_portrait_filename[Different filename.png-Alcyone LE-zatic-replay_date5-False]
❌ test_match_portrait_filename[solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png-Solaris LE-lllllllllllI-replay_date6-True]
portrait_file = 'solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png'
tests.unit.test_reader
✅ test_replay_typing[Equilibrium LE (84).SC2Replay]
✅ test_default_projection_time[Equilibrium LE (84).SC2Replay]
✅ test_default_projection_chrono[Radhuset Station LE (85) ZvP chrono.SC2Replay]
✅ test_default_projection_workers[Radhuset Station LE (85) ZvP chrono.SC2Replay]
✅ test_is_gg[ggwp-True]
✅ test_is_gg[fu-False]
✅ test_is_gg[ggggg-True]
✅ test_is_gg[bg-False]
✅ test_is_gg[gg-True]
✅ test_is_gg[GG-True]
✅ test_replaystats_worker_micro[Goldenaura LE (282) 2 base Terran tank allin.SC2Replay-expected0]
Annotations
Check failure on line 0 in tests/test-results.xml
github-actions / pytest results
pytest ► tests.unit.test_player ► test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-zatic-replay_date0-True]
Failed test found in:
tests/test-results.xml
Error:
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
Raw output
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
map_name = 'Alcyone LE', opponent_name = 'zatic'
replay_date = datetime.datetime(2024, 6, 7, 15, 7, 24), expected = True
@pytest.mark.parametrize(
"portrait_file, map_name, opponent_name, replay_date, expected",
[
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Different Map",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"different opponent",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 7, 25),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 15, 0),
False,
),
(
"Different filename.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png",
"Solaris LE",
"lllllllllllI",
datetime(2024, 1, 14, 18, 32, 50),
True,
),
],
)
def test_match_portrait_filename(
portrait_file, map_name, opponent_name, replay_date, expected
):
> assert (
match_portrait_filename(portrait_file, map_name, opponent_name, replay_date)
== expected
)
E AssertionError: assert False == True
E + where False = match_portrait_filename('Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png', 'Alcyone LE', 'zatic', datetime.datetime(2024, 6, 7, 15, 7, 24))
tests/unit/test_player.py:65: AssertionError
Check failure on line 0 in tests/test-results.xml
github-actions / pytest results
pytest ► tests.unit.test_player ► test_match_portrait_filename[Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png-Alcyone LE-Atreyu-replay_date3-True]
Failed test found in:
tests/test-results.xml
Error:
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
Raw output
portrait_file = 'Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png'
map_name = 'Alcyone LE', opponent_name = 'Atreyu'
replay_date = datetime.datetime(2024, 6, 7, 15, 7, 25), expected = True
@pytest.mark.parametrize(
"portrait_file, map_name, opponent_name, replay_date, expected",
[
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Different Map",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"different opponent",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 7, 25),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 15, 0),
False,
),
(
"Different filename.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png",
"Solaris LE",
"lllllllllllI",
datetime(2024, 1, 14, 18, 32, 50),
True,
),
],
)
def test_match_portrait_filename(
portrait_file, map_name, opponent_name, replay_date, expected
):
> assert (
match_portrait_filename(portrait_file, map_name, opponent_name, replay_date)
== expected
)
E AssertionError: assert False == True
E + where False = match_portrait_filename('Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png', 'Alcyone LE', 'Atreyu', datetime.datetime(2024, 6, 7, 15, 7, 25))
tests/unit/test_player.py:65: AssertionError
Check failure on line 0 in tests/test-results.xml
github-actions / pytest results
pytest ► tests.unit.test_player ► test_match_portrait_filename[solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png-Solaris LE-lllllllllllI-replay_date6-True]
Failed test found in:
tests/test-results.xml
Error:
portrait_file = 'solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png'
Raw output
portrait_file = 'solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png'
map_name = 'Solaris LE', opponent_name = 'lllllllllllI'
replay_date = datetime.datetime(2024, 1, 14, 18, 32, 50), expected = True
@pytest.mark.parametrize(
"portrait_file, map_name, opponent_name, replay_date, expected",
[
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Different Map",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"different opponent",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 7, 25),
True,
),
(
"Alcyone LE - Atreyu vs zatic 2024-06-07 17-07-24_portrait.png",
"Alcyone LE",
"Atreyu",
datetime(2024, 6, 7, 15, 15, 0),
False,
),
(
"Different filename.png",
"Alcyone LE",
"zatic",
datetime(2024, 6, 7, 15, 7, 24),
False,
),
(
"solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png",
"Solaris LE",
"lllllllllllI",
datetime(2024, 1, 14, 18, 32, 50),
True,
),
],
)
def test_match_portrait_filename(
portrait_file, map_name, opponent_name, replay_date, expected
):
> assert (
match_portrait_filename(portrait_file, map_name, opponent_name, replay_date)
== expected
)
E AssertionError: assert False == True
E + where False = match_portrait_filename('solaris le - Zatic vs BARCODE 2024-01-14 20-32-50.png', 'Solaris LE', 'lllllllllllI', datetime.datetime(2024, 1, 14, 18, 32, 50))
tests/unit/test_player.py:65: AssertionError