diff --git a/src/diana/tests/sgfParser.py b/src/diana/tests/sgfParser.py new file mode 100644 --- /dev/null +++ b/src/diana/tests/sgfParser.py @@ -0,0 +1,19 @@ +import unittest +from unittest import TestCase +import os + +from ..sgfParser import Collection + + +dataDir=os.path.join(os.path.dirname(__file__), "data") + +class TestCollection(TestCase): + def testEmptySgf(self): + Collection("(;)") + + def testSimpleSgf(self): + with open(os.path.join(dataDir, "simple.sgf")) as f: + Collection(f.read()) + +if __name__ == '__main__': + unittest.main()