mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
More refactoring of the unittest system
This commit is contained in:
parent
7571e3606d
commit
67c4896a53
6 changed files with 8 additions and 10 deletions
|
|
@ -78,7 +78,7 @@ class CommandTest(TestCase):
|
|||
CID = 0 # we must set a different CID in every test to avoid unique-name collisions creating the objects
|
||||
def setUp(self):
|
||||
"sets up testing environment"
|
||||
print "creating player %i: %s" % (self.CID, self.__class__.__name__)
|
||||
#print "creating player %i: %s" % (self.CID, self.__class__.__name__)
|
||||
self.player = create.create_player("TestPlayer%i" % self.CID, "test@test.com", "testpassword", typeclass=TestPlayerClass)
|
||||
self.player2 = create.create_player("TestPlayer%ib" % self.CID, "test@test.com", "testpassword", typeclass=TestPlayerClass)
|
||||
self.room1 = create.create_object("src.objects.objects.Room", key="Room%i"%self.CID, nohome=True)
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ INSTALLED_APPS = (
|
|||
AUTH_USER_MODEL = "players.PlayerDB"
|
||||
#AUTH_PROFILE_MODULE = "players.PlayerDB"
|
||||
# Use a custom test runner that just tests Evennia-specific apps.
|
||||
TEST_RUNNER = 'src.utils.test_utils.EvenniaTestSuiteRunner'
|
||||
TEST_RUNNER = 'src.server.testing_suite.EvenniaTestSuiteRunner'
|
||||
|
||||
######################################################################
|
||||
# Django extensions
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ FORM = '''
|
|||
| cccccccc | ccccccccccccccccccccccccccccccccccc |
|
||||
| cccccccc | cccccccccccccccccBccccccccccccccccc |
|
||||
| | |
|
||||
`-----------------------------------------------´
|
||||
-------------------------------------------------
|
||||
'''
|
||||
|
||||
The first line of the FORM string is ignored. The forms and table
|
||||
|
|
@ -117,7 +117,7 @@ This produces the following result:
|
|||
| |**|* | Herbalism |14 |990/1400 |
|
||||
| |* | | Smithing |9 |205/900 |
|
||||
| | |
|
||||
`----------------------------------------------´
|
||||
------------------------------------------------
|
||||
|
||||
The marked forms have been replaced with Cells of text and with
|
||||
EvTables. The form can be updated by simply re-applying form.map()
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ FORM = """
|
|||
| cccccccc | ccccccccccccccccccccccccccccccccccc |
|
||||
| cccccccc | cccccccccccccccccBccccccccccccccccc |
|
||||
| | |
|
||||
`-----------------------------------------------´
|
||||
-------------------------------------------------
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
# coding=utf-8
|
||||
"""
|
||||
|
||||
EvTable
|
||||
|
|
@ -625,7 +624,7 @@ class Cell(object):
|
|||
return unicode(ANSIString("\n").join(self.formatted))
|
||||
|
||||
|
||||
# Main Evtable class
|
||||
## Main Evtable class
|
||||
|
||||
class EvTable(object):
|
||||
"""
|
||||
|
|
@ -635,7 +634,6 @@ class EvTable(object):
|
|||
all cell boundaries lining up.
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Args:
|
||||
|
|
@ -738,8 +736,8 @@ class EvTable(object):
|
|||
pcorners = kwargs.pop("pretty_corners", False)
|
||||
self.corner_top_left = _to_ansi(kwargs.pop("corner_top_left", '.' if pcorners else self.corner_char))
|
||||
self.corner_top_right = _to_ansi(kwargs.pop("corner_top_right", '.' if pcorners else self.corner_char))
|
||||
self.corner_bottom_left = _to_ansi(kwargs.pop("corner_bottom_left", '`' if pcorners else self.corner_char))
|
||||
self.corner_bottom_right = _to_ansi(kwargs.pop("corner_bottom_right", '´' if pcorners else self.corner_char))
|
||||
self.corner_bottom_left = _to_ansi(kwargs.pop("corner_bottom_left", ' ' if pcorners else self.corner_char))
|
||||
self.corner_bottom_right = _to_ansi(kwargs.pop("corner_bottom_right", ' ' if pcorners else self.corner_char))
|
||||
|
||||
self.width = kwargs.pop("width", None)
|
||||
self.height = kwargs.pop("height", None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue