Skip to content

Commit 474c87b

Browse files
committed
Add another SAN disambiguation test (niklasf/shakmaty#77)
1 parent 95803fc commit 474c87b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,11 @@ def test_san(self):
703703
self.assertEqual(board.san(chess.Move.from_uci("h4g6")), "Nh4g6")
704704
self.assertEqual(board.fen(), fen)
705705

706+
# Test a bug where shakmaty used overly specific disambiguation.
707+
fen = "8/2KN1p2/5p2/3N1B1k/5PNp/7P/7P/8 w - -"
708+
board = chess.Board(fen)
709+
self.assertEqual(board.san(chess.Move.from_uci("d5f6")), "N5xf6#")
710+
706711
# Do not disambiguate illegal alternatives.
707712
fen = "8/8/8/R2nkn2/8/8/2K5/8 b - - 0 1"
708713
board = chess.Board(fen)

0 commit comments

Comments
 (0)