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