add tests for broken SGFs

This commit is contained in:
Hiraoka committed 2020-07-17 20:24:59 +09:00
1 parent 9727a049b4
commit 176a618458
2 files changed
+143

No files matched your search

+133
View File
@@ -0,0 +1,133 @@
(
;
FileFormat[1]GaMe[1]
VieW[]
SiZe[9]
PlayerBlack[hi]
PlayerWhite[ka]
KoMi[-1.5]
Black[ff]
;
White[gd]
;
Black[fd]
;
White[fe]
;
Black[ge]
;
White[ee]
;
Black[gc]
;
White[hd]
;
Black[hc]
;
White[he]
;
Black[gf]
;
White[hf]
;
Black[ed]
;
White[ef]
;
Black[eg]
;
White[dg]
;
Black[fg]
;
White[gh]
;
Black[cg]
;
White[dh]
;
Black[df]
;
White[de]
;
Black[cf]
;
White[dd]
;
Black[dc]
;
White[ec]
;
Black[fc]
;
White[cc]
;
Black[eb]
;
White[be]
;
Black[bf]
;
White[ce]
;
Black[bd]
;
White[ae]
;
Black[af]
;
White[db]
;
Black[ec]
;
White[bc]
;
Black[eh]
;
White[gg]
;
Black[ch]
;
White[fh]
;
Black[di]
;
White[ic]
;
Black[cb]
;
White[bb]
;
Black[da]
;
White[hb]
;
Black[gb]
;
White[ba]
;
Black[ca]
;
White[fi]
;
Black[id]
;
White[ib]
;
Black[ha]
;
White[ie]
;
Black[ga]
;
White[hg]
;
Black[ia]
;
Comment[Black: 13 + 4 = 17
White: 13 + 2 + -1.5 = 13.5
Black wins by 3.5]
White[id]
)
+10
View File
@@ -91,6 +91,16 @@ def test_pandanet():
assert move is root assert move is root
def test_old_long_properties():
file = os.path.join(os.path.dirname(__file__), "data/xmgt97.sgf")
SGF.parse_file(file)
def test_old_server_style():
input_sgf = "... 01:23:45 +0900 (JST) ... (;SZ[19];B[aa];W[ba];)"
SGF.parse_sgf(input_sgf)
def test_ogs(): def test_ogs():
file = os.path.join(os.path.dirname(__file__), "data/ogs.sgf") file = os.path.join(os.path.dirname(__file__), "data/ogs.sgf")
tree = SGF.parse_file(file) tree = SGF.parse_file(file)