Made all unittests pass again.
This commit is contained in:
parent
323a353ec3
commit
83570848d6
4 changed files with 4 additions and 4 deletions
|
|
@ -425,7 +425,7 @@ class EvForm(object):
|
|||
return unicode(ANSIString("\n").join([line for line in self.form]))
|
||||
|
||||
def _test():
|
||||
"test evform"
|
||||
"test evform. This is used by the unittest system."
|
||||
form = EvForm("evennia.utils.evform_test")
|
||||
|
||||
# add data to each tagged form cell
|
||||
|
|
@ -449,7 +449,6 @@ def _test():
|
|||
# add the tables to the proper ids in the form
|
||||
form.map(tables={"A": tableA,
|
||||
"B": tableB})
|
||||
|
||||
# unicode is required since the example contains non-ascii characters
|
||||
#print(unicode(form))
|
||||
return form
|
||||
|
|
|
|||
|
|
@ -348,8 +348,10 @@ from evennia.utils import evform
|
|||
|
||||
class TestEvForm(TestCase):
|
||||
def test_form(self):
|
||||
self.maxDiff = None
|
||||
self.assertEqual(unicode(evform._test()),
|
||||
u'.------------------------------------------------.\n| |\n| Name: \x1b[1m\x1b[32mTom\x1b[1m\x1b[32m \x1b[1m\x1b[32mthe\x1b[1m\x1b[32m \x1b[0m Player: \x1b[1m\x1b[33mGriatch\x1b[0m \x1b[1m\x1b[32m\x1b[1m\x1b[32m\x1b[1m\x1b[32m\x1b[1m\x1b[32m\x1b[0m |\n| \x1b[1m\x1b[32mBouncer\x1b[0m\x1b[0m |\n| |\n >----------------------------------------------<\n| |\n| Desc: A sturdy \x1b[0m STR: 12 \x1b[0m DEX: 10 \x1b[0m |\n| fellow\x1b[0m INT: 5 \x1b[0m STA: 18 \x1b[0m |\n| LUC: 10 MAG: 3 |\n| |\n >----------------------------------------------<\n| | |\n| HP|MV |M\x1b[0m | Skill |Value |Exp \x1b[0m |\n| ~~+~~~+~ | ~~~~~~~~~~~~+~~~~~~~~~~+~~~~~~~~~~~ |\n| **|***\x1b[0m|*\x1b[0m | Shooting |12 |550/1200 \x1b[0m\x1b[0m |\n| |**\x1b[0m |*\x1b[0m | Herbalism |14 |990/1400 \x1b[0m\x1b[0m |\n| | |*\x1b[0m | Smithing |9 |205/900 \x1b[0m |\n| | |\n ------------------------------------------------\n')
|
||||
|
||||
def test_ansi_escape(self):
|
||||
# note that in a msg() call, the result would be the correct |-----,
|
||||
# in a print, ansi only gets called once, so ||----- is the result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue