aboutsummaryrefslogtreecommitdiff
path: root/tests/test_sgf.py
blob: 126642916e2697c3f768483314d3a7662e1d2400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Tests for processing of SGF files."""

import unittest

from imago.sgfParser.sgfyacc import parser

TESTING_SGF = 'tests/testingSGF.sgf'

class TestSGF(unittest.TestCase):
    """Test processing SGF files."""

    def testToGameTree(self):
        """Test converting file to GameTree"""

        file = open(TESTING_SGF, "r")
        text = file.read()
        file.close()

        astNode = parser.parse(text)

        astNode.toGameMoveTree()

        astNode.toString()


if __name__ == '__main__':
    unittest.main()