Skip to content

Commit

Permalink
Add basic tests for SVG circles and arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jan 1, 2018
1 parent 6a5210c commit 232a1b1
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 @@ -25,6 +25,7 @@
import chess.syzygy
import chess.gaviota
import chess.variant
import chess.svg
import collections
import copy
import os
Expand Down Expand Up @@ -3248,6 +3249,15 @@ def test_svg_board(self):
self.assertIn("white bishop", svg)
self.assertNotIn("black queen", svg)

def test_svg_arrows(self):
svg = chess.svg.board(arrows=[(chess.A1, chess.A1)])
self.assertIn("<circle", svg)
self.assertNotIn("<line", svg)

svg = chess.svg.board(arrows=[(chess.A1, chess.H8)])
self.assertNotIn("<circle", svg)
self.assertIn("<line", svg)


class SuicideTestCase(unittest.TestCase):

Expand Down

0 comments on commit 232a1b1

Please sign in to comment.