mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Enable standard unittest discovery by creating __init__.py files and renaming test modules to test*.py.
22 lines
586 B
Python
22 lines
586 B
Python
# Written by Shlomi Fish, under the MIT Expat License.
|
|
|
|
import unittest
|
|
|
|
from pysollib.acard import AbstractCard
|
|
|
|
|
|
class AbstractCardTests(unittest.TestCase):
|
|
def test_cards(self):
|
|
card1 = AbstractCard(1001, 0, 1, 2, 3001)
|
|
# TEST
|
|
self.assertEqual(card1.color, 0, 'card1.color is sane.')
|
|
|
|
# TEST
|
|
self.assertEqual(card1.rank, 2, 'card1.rank')
|
|
|
|
card2 = AbstractCard(1001, 0, 3, 7, 3001)
|
|
# TEST
|
|
self.assertEqual(card2.color, 1, 'card2.color is sane.')
|
|
|
|
# TEST
|
|
self.assertEqual(card2.rank, 7, 'card2.rank')
|