From 1e360ab940f61e7294cbeaa842d7e968c265e70f Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Fri, 19 Jan 2018 15:29:26 +0000
Subject: [PATCH] Docs and unit tests for meta module

---
 doc/fsl.utils.meta.rst |  7 +++++++
 tests/test_meta.py     | 24 ++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 doc/fsl.utils.meta.rst
 create mode 100644 tests/test_meta.py

diff --git a/doc/fsl.utils.meta.rst b/doc/fsl.utils.meta.rst
new file mode 100644
index 000000000..c5c5cde5c
--- /dev/null
+++ b/doc/fsl.utils.meta.rst
@@ -0,0 +1,7 @@
+``fsl.utils.meta``
+==================
+
+.. automodule:: fsl.utils.meta
+    :members:
+    :undoc-members:
+    :show-inheritance:
diff --git a/tests/test_meta.py b/tests/test_meta.py
new file mode 100644
index 000000000..2d323d066
--- /dev/null
+++ b/tests/test_meta.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+#
+# test_meta.py -
+#
+# Author: Paul McCarthy <pauldmccarthy@gmail.com>
+#
+
+import fsl.utils.meta as meta
+
+
+def test_meta():
+    m = meta.Meta()
+
+    data = {'a': 1, 'b' : 2, 'c' : 3}
+
+    for k, v in data.items():
+        m.setMeta(k, v)
+
+    for k, v in data.items():
+        assert m.getMeta(k) == v
+
+    assert list(data.keys())   == list(m.metaKeys())
+    assert list(data.values()) == list(m.metaValues())
+    assert list(data.items())  == list(m.metaItems())
-- 
GitLab