mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
Resolve unittests
This commit is contained in:
parent
6cf6476417
commit
7dec566926
2 changed files with 3 additions and 5 deletions
|
|
@ -187,7 +187,6 @@ class TestProtLib(EvenniaTest):
|
|||
|
||||
def test_prototype_to_str(self):
|
||||
prstr = protlib.prototype_to_str(self.prot)
|
||||
print("prst: {}".format(prstr))
|
||||
self.assertTrue(prstr.startswith("|cprototype-key:|n"))
|
||||
|
||||
def test_check_permission(self):
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ be of use when designing your own game.
|
|||
|
||||
"""
|
||||
from __future__ import division, print_function
|
||||
import itertools
|
||||
from builtins import object, range
|
||||
from future.utils import viewkeys, raise_
|
||||
|
||||
|
|
@ -233,10 +232,10 @@ def justify(text, width=None, align="f", indent=0):
|
|||
pad = " " * (line_rest // 2)
|
||||
line[0] = pad + line[0]
|
||||
if line[-1] == "\n\n":
|
||||
line[-1] = line[-1] + pad + " " * (line_rest % 2)
|
||||
else:
|
||||
line[-1] = pad + " " * (line_rest % 2 - 1) + \
|
||||
line[-1] += pad + " " * (line_rest % 2 - 1) + \
|
||||
"\n" + " " * width + "\n" + " " * width
|
||||
else:
|
||||
line[-1] = line[-1] + pad + " " * (line_rest % 2)
|
||||
else: # align 'f'
|
||||
gap += " " * (line_rest // max(1, ngaps))
|
||||
rest_gap = line_rest % max(1, ngaps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue