Files
@ b66f5379b832
Branch filter:
Location: Diana/src/tests/testSgfParser.py - annotation
b66f5379b832
495 B
text/x-python
split SgfParser into multiple files
f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 b66f5379b832 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 b66f5379b832 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 f0b8120281b9 | import unittest
from unittest import TestCase
import os
from sgfParser.collection 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())
def testComplexSgf(self):
with open(os.path.join(dataDir, "kogos.sgf")) as f:
Collection(f.read())
if __name__ == '__main__':
unittest.main()
|