Skip to content

Commit

Permalink
Ponderhit does not take debug argument
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Feb 18, 2015
1 parent 7027ee4 commit 094cc1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chess/uci.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def _execute(self, engine):


class PonderhitCommand(IsReadyCommand):
def __init__(self, debug, callback=None):
def __init__(self, callback=None):
super(PonderhitCommand, self).__init__(callback)

def _execute(self, engine):
Expand Down
8 changes: 8 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,14 @@ def test_ponderhit(self):
self.engine.ponderhit()
self.mock.assert_done()

def test_async_ponderhit(self):
self.mock.expect("ponderhit")
self.mock.expect("isready", ("readyok", ))
command = self.engine.ponderhit(async_callback=True)
command.wait()
self.assertTrue(command.is_done())
self.mock.assert_done()

def test_kill(self):
self.engine.kill()
self.mock.assert_terminated()
Expand Down

0 comments on commit 094cc1f

Please sign in to comment.