aboutsummaryrefslogtreecommitdiff
path: root/tests/test_sgf.py
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2023-06-12 20:16:04 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2023-06-12 20:16:04 +0200
commitd4a81490bf1396089eb3dac5955a3a8e4cb26e37 (patch)
treef96febc7950c2742bc36f04ab13bff56851f2388 /tests/test_sgf.py
parentb08408d23186205e71dfc68634021e3236bfb45c (diff)
parent65ac3a6b050dcb88688cdc2654b1ed6693e9a160 (diff)
downloadimago-master.tar.gz
imago-master.zip
Merge branch 'devel'HEADmaster
Diffstat (limited to 'tests/test_sgf.py')
-rw-r--r--tests/test_sgf.py27
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()