示例#1
0
 def test_error_in_parsing(self):
     """ Обработка неверного файла """
     parser = SgfParser()
     sgf = "This is not sgf"
     with self.assertRaises(ValueError):
         parser.load_game_from_string(sgf)
示例#2
0
 def test_unsupported_game(self):
     sgf = "(;FF[4]C[root]GM[2])"
     with self.assertRaises(UnsupportedGameException):
         parser = SgfParser()
         parser.load_game_from_string(sgf)
示例#3
0
 def test_unsupported_game(self):
     sgf = "(;FF[4]C[root]GM[2])"
     with self.assertRaises(UnsupportedGameException):
         parser = SgfParser()
         parser.load_game_from_string(sgf)
示例#4
0
 def load_root_node(self, sgf):
     parser = SgfParser()
     game = parser.load_game_from_string(sgf)
     return game.root
示例#5
0
 def load_root_node(self, sgf):
     parser = SgfParser()
     game = parser.load_game_from_string(sgf)
     return game.root