mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +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
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
"""
|
||||
Test runner for Evennia test suite. Run with "game/manage.py test".
|
||||
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
|
||||
|
||||
class EvenniaTestSuiteRunner(DjangoTestSuiteRunner):
|
||||
"""
|
||||
This test runner only runs tests on the apps specified in src/ and game/ to
|
||||
avoid running the large number of tests defined by Django
|
||||
"""
|
||||
def build_suite(self, test_labels, extra_tests=None, **kwargs):
|
||||
"""
|
||||
Build a test suite for Evennia. test_labels is a list of apps to test.
|
||||
If not given, a subset of settings.INSTALLED_APPS will be used.
|
||||
"""
|
||||
if not test_labels:
|
||||
test_labels = [applabel.rsplit('.', 1)[1] for applabel in settings.INSTALLED_APPS
|
||||
if (applabel.startswith('src.') or applabel.startswith('game.'))]
|
||||
return super(EvenniaTestSuiteRunner, self).build_suite(test_labels, extra_tests=extra_tests, **kwargs)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue