From da03efeaed5c578d28ed50b5d91404e4c2e9bfbd Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Fri, 6 Jan 2017 17:52:38 +0100 Subject: Add an help string in a comment in the generated empty files --- tests/test_collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_collection.py') diff --git a/tests/test_collection.py b/tests/test_collection.py index 9e3df7c..8e8e5f1 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -104,7 +104,11 @@ class testEntries(unittest.TestCase): self.collection.save_entries(entries=[new_entry]) entry_fname = 'tests/data/simple/items/' + new_entry.fname with open(entry_fname) as fp: - written = ruamel.yaml.safe_load(fp) + text = fp.read() + self.assertIn('quantity (integer): how many items are there', text) + self.assertIn('other (yaml):', text) + self.assertNotIn('position (string)', text) + written = ruamel.yaml.safe_load(text) self.assertIsInstance(written['quantity'], int) self.assertIsInstance(written['name'], str) os.remove(entry_fname) -- cgit v1.2.3