Skip to content

Commit

Permalink
Start debugging execution on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Feb 15, 2015
1 parent cf052ff commit a887582
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function

import chess
import chess.polyglot
import chess.pgn
Expand Down Expand Up @@ -1117,11 +1119,16 @@ def test_scan_headers(self):
class StockfishTestCase(unittest.TestCase):

def setUp(self):
print("StockfishTestCase::setUp")
self.engine = chess.uci.popen_engine("/usr/games/stockfish")
print("StockfishTestCase::setUp | after popen")
self.engine.uci()
print("StockfishTestCase::setUp | after uci")

def tearDown(self):
print("StockfishTestCase::tearDown")
self.engine.quit()
print("StockfishTestCase::tearDown | after teardown")

def test_bratko_kopec(self):
epds = [
Expand All @@ -1139,10 +1146,13 @@ def test_bratko_kopec(self):
self.assertEqual(result[0], operations["bm"], operations["id"])

def test_async(self):
print("StockfishTestCase::test_async")
self.engine.ucinewgame()
print("StockfishTestCase::test_async | after ucinewgame")
command = self.engine.go(movetime=1000, async_callback=True)
self.assertFalse(command.is_done())
command.wait()
print("StockfishTestCase::test_async | after wait")
self.assertTrue(command.is_done())

def test_async_callback(self):
Expand Down

0 comments on commit a887582

Please sign in to comment.