Skip to content

Commit

Permalink
add an integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Oct 3, 2021
1 parent 55aeb94 commit ab48b9d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion pysol_cards/tests/test_pysol_cards.py
Expand Up @@ -15,7 +15,6 @@
"""

import pysol_cards.random

from pysol_cards.tests import base


Expand Down Expand Up @@ -87,3 +86,26 @@ def test_msdeals_large_seed(self):
except ValueError:
error = True
self.assertEqual(error, True, "value out of range.")

def test_ms24_text(self):
from pysol_cards.cards import CardRenderer
from pysol_cards.deal_game import Game
from pysol_cards.random_base import RandomBase
ms24s = Game(
"freecell", 24,
RandomBase.DEALS_MS,
max_rank=13
).calc_layout_string(CardRenderer(True))
self.assertEqual(
ms24s,
"""4C 2C 9C 8C QS 4S 2H
5H QH 3C AC 3H 4H QD
QC 9S 6H 9H 3S KS 3D
5D 2S JC 5C JH 6D AS
2D KD TH TC TD 8D
7H JS KH TS KC 7C
AH 5S 6S AD 8H JD
7S 6C 7D 4D 8S 9D
""",
"MS deal #24",
)
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py35,py27,pep8
envlist = py39
skipsdist = True

[testenv]
Expand Down

0 comments on commit ab48b9d

Please sign in to comment.