mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
27 lines
725 B
Python
27 lines
725 B
Python
# Written by Shlomi Fish, under the MIT Expat License.
|
|
|
|
import unittest
|
|
from pysollib.acard import AbstractCard
|
|
|
|
|
|
class MyTests(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')
|
|
|
|
|
|
def mymain():
|
|
from pycotap import TAPTestRunner
|
|
suite = unittest.TestLoader().loadTestsFromTestCase(MyTests)
|
|
TAPTestRunner().run(suite)
|