From 3411e352de606600a61bff49ddf2cf1c17c0d8ad Mon Sep 17 00:00:00 2001 From: Bhargavaram Krishnapur <132352169+Codex-Crusader@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:23:03 +0530 Subject: [PATCH 1/2] Add tests for parse_input function --- tests/test_parse_input.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_parse_input.py b/tests/test_parse_input.py index 68dfcc5..416b79a 100644 --- a/tests/test_parse_input.py +++ b/tests/test_parse_input.py @@ -20,3 +20,17 @@ def test_parse_input_single_target(): mv = parse_input(board, "e4") assert mv is not None assert mv.to_square == chess.parse_square("e4") + + +def test_parse_input_algebraic(): + board = chess.Board() + mv = parse_input(board, "Nf3") # Knight to f3 + assert mv is not None + assert mv.uci() == "g1f3" # Knight from g1 to f3 + + +def test_parse_input_invalid(): + board = chess.Board() + mv = parse_input(board, "invalid") + assert mv is None + From 0b0ec3b3ac4df3996487c93ea624847fd034185e Mon Sep 17 00:00:00 2001 From: Bhargavaram Krishnapur <132352169+Codex-Crusader@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:23:49 +0530 Subject: [PATCH 2/2] Update tests/test_parse_input.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tests/test_parse_input.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_parse_input.py b/tests/test_parse_input.py index 416b79a..cc519b3 100644 --- a/tests/test_parse_input.py +++ b/tests/test_parse_input.py @@ -33,4 +33,3 @@ def test_parse_input_invalid(): board = chess.Board() mv = parse_input(board, "invalid") assert mv is None -