diff options
Diffstat (limited to 'tests/test_collection.py')
-rw-r--r-- | tests/test_collection.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_collection.py b/tests/test_collection.py index c792f29..2218169 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -37,6 +37,10 @@ class testEntries(unittest.TestCase): self.assertEqual(entry.idterm, 'Q' + eid) self.assertEqual(entry.short_id, eid[:8]) + @unittest.skipIf( + ruamel.yaml.version_info < (0, 16, 0), + "Preservation of data on file requires ruamel.yaml >= 0.16", + ) def test_write_new(self): new_entry = lesana.Entry(self.collection) self.collection.save_entries(entries=[new_entry]) @@ -351,6 +355,10 @@ class testComplexCollection(unittest.TestCase): for f in to_test: self.assertIsInstance(self.collection.fields[f[0]], f[1]) + @unittest.skipIf( + ruamel.yaml.version_info < (0, 16, 0), + "Preservation of data on file requires ruamel.yaml >= 0.16", + ) def test_comments_are_preserved(self): e = self.collection.entry_from_eid('5084bc6e94f24dc6976629282ef30419') yaml_data = e.yaml_data @@ -361,6 +369,10 @@ class testComplexCollection(unittest.TestCase): yaml_data.endswith("# and a comment at the end\n") ) + @unittest.skipIf( + ruamel.yaml.version_info < (0, 16, 0), + "Preservation of data on file requires ruamel.yaml >= 0.16", + ) def test_data_is_stored_as_written_on_file(self): e = self.collection.entry_from_eid('5084bc6e94f24dc6976629282ef30419') fname = 'tests/data/complex/items/' + \ |