mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-15 02:54:09 -04:00
add a test
This commit is contained in:
parent
ec808f30e9
commit
7c841293bd
1 changed files with 12 additions and 0 deletions
|
@ -71,3 +71,15 @@ class MyTests(unittest.TestCase):
|
||||||
+ "<card id=\"1002\" suit=\"spades\" " +
|
+ "<card id=\"1002\" suit=\"spades\" " +
|
||||||
"rank=\"two\" turn=\"face-up\"/>\n"
|
"rank=\"two\" turn=\"face-up\"/>\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_write_card3(self):
|
||||||
|
f = cStringIO()
|
||||||
|
e = KpatXmlEmitter(f)
|
||||||
|
self.assertTrue(e)
|
||||||
|
e.writeCard(card=AbstractCard(1004, 0, 2, 11, 3001), turn="face-up")
|
||||||
|
self.assertEqual(
|
||||||
|
f.getvalue(),
|
||||||
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
|
+ "<card id=\"1004\" suit=\"hearts\" " +
|
||||||
|
"rank=\"queen\" turn=\"face-up\"/>\n"
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue