speedier format/_map()s
This commit is contained in:
parent
940c9909a2
commit
81b6cdb93b
6 changed files with 23 additions and 19 deletions
|
|
@ -625,7 +625,7 @@ class CraftingRecipe(CraftingRecipeBase):
|
|||
mapping["outputs"] = iter_to_str(self.output_names)
|
||||
|
||||
# populate template and return
|
||||
return message.format(**mapping)
|
||||
return message.format_map(mapping)
|
||||
|
||||
@classmethod
|
||||
def seed(cls, tool_kwargs=None, consumable_kwargs=None, location=None):
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ class TestCraftingRecipe(BaseEvenniaTestCase):
|
|||
}
|
||||
|
||||
result = recipe._format_message(msg, **kwargs)
|
||||
self.assertEqual(result, msg.format(**expected))
|
||||
self.assertEqual(result, msg.format_map(expected))
|
||||
|
||||
def test_craft__success(self):
|
||||
"""Test to create a result from the recipe"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue