diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-12 20:16:04 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-12 20:16:04 +0200 |
commit | d4a81490bf1396089eb3dac5955a3a8e4cb26e37 (patch) | |
tree | f96febc7950c2742bc36f04ab13bff56851f2388 /tests/test_sgf.py | |
parent | b08408d23186205e71dfc68634021e3236bfb45c (diff) | |
parent | 65ac3a6b050dcb88688cdc2654b1ed6693e9a160 (diff) | |
download | imago-master.tar.gz imago-master.zip |
Diffstat (limited to 'tests/test_sgf.py')
-rw-r--r-- | tests/test_sgf.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_sgf.py b/tests/test_sgf.py new file mode 100644 index 0000000..1266429 --- /dev/null +++ b/tests/test_sgf.py @@ -0,0 +1,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() |