Added CLI options for controlling text output
This commit is contained in:
+6
-2
@@ -35,6 +35,10 @@ def sample_map():
|
||||
|
||||
[1]
|
||||
name = "room 1"
|
||||
description = "A large empty room."
|
||||
notes = [
|
||||
"Locked door DC 15"
|
||||
]
|
||||
[2]
|
||||
name = "room 2"
|
||||
[3]
|
||||
@@ -62,13 +66,13 @@ def test_renderer(manager, sample_map):
|
||||
srclines = sample_map.splitlines()[1:]
|
||||
strlines = str(test_map).splitlines()
|
||||
for i in range(len(strlines)):
|
||||
assert strlines[i] == srclines[i].lstrip(' #').ljust(21, " ")
|
||||
assert strlines[i] == srclines[i].lstrip(" #").ljust(21, " ")
|
||||
|
||||
|
||||
def test_grid_coordiates(manager):
|
||||
coord_length = len(X_COORDS)
|
||||
map_size = 2 * coord_length + 1
|
||||
bigmap = StringIO((' # ' + ("." * map_size) + "\n") * map_size)
|
||||
bigmap = StringIO((" # " + ("." * map_size) + "\n") * map_size)
|
||||
test_map = battlemap.BattleMap(source=bigmap, tileset=manager.load("ascii"))
|
||||
test_map.load()
|
||||
assert test_map.grid.data[-1][-1].coordinates == (f"{map_size - 1}", X_COORDS[0] * 3)
|
||||
|
||||
Reference in New Issue
Block a user