aboutsummaryrefslogtreecommitdiffstats
path: root/unittest
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-01-27 20:28:45 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-01-27 20:28:45 +0100
commite729a212a72a9dbbcaa4a896194290c1bf258ae0 (patch)
tree7dddb045e3fde7e3b149426f8711dfc195b8f591 /unittest
parent2df704760f64ba36f0190ebc1f8344801d35d3c6 (diff)
downloadpyexiv2-e729a212a72a9dbbcaa4a896194290c1bf258ae0.tar.gz
XMP Boolean to string conversion + unit tests.
Diffstat (limited to 'unittest')
-rw-r--r--unittest/xmp.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittest/xmp.py b/unittest/xmp.py
index 9db9434..09aca55 100644
--- a/unittest/xmp.py
+++ b/unittest/xmp.py
@@ -46,6 +46,14 @@ class TestXmpTag(unittest.TestCase):
# Invalid values: not converted
self.assertEqual(XmpTag._convert_to_python('invalid', xtype), 'invalid')
+ def test_convert_to_string_boolean(self):
+ xtype = 'Boolean'
+ # Valid values
+ self.assertEqual(XmpTag._convert_to_string(True, xtype), 'True')
+ self.assertEqual(XmpTag._convert_to_string(False, xtype), 'False')
+ # Invalid values
+ self.assertEqual(XmpTag._convert_to_string('invalid', xtype), 'invalid')
+
def test_convert_to_python_choice(self):
pass