~sanelson/py3exiv2/bugfix_boost_python_build

« back to all changes in this revision

Viewing changes to py3exiv2/test/xmp.py

  • Committer: Sam Nelson
  • Date: 2020-03-19 01:19:12 UTC
  • Revision ID: sanelson@siliconfuture.net-20200319011912-i966s44ws0m7n6hx
Fixed code and tests for NoneType TestXmpTag failing tests for xmp.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
229
229
        self.assertEqual(tag._convert_to_python('Python Software Foundation', 'ProperName'), 
230
230
                                                'Python Software Foundation')
231
231
        # Invalid values
232
 
        self.assertRaises(XmpValueError, tag._convert_to_python(None, 'ProperName'))
 
232
        self.assertRaises(XmpValueError, tag._convert_to_python, None, 'ProperName')
233
233
 
234
234
    def test_convert_to_string_propername(self):
235
235
        # Valid values
249
249
        self.assertEqual(tag._convert_to_python(b'Some text with exotic ch\xc3\xa0r\xc3\xa4ct\xc3\xa9r\xca\x90.', 'Text'),
250
250
                         'Some text with exotic chàräctérʐ.')
251
251
        # Invalid values
252
 
        self.assertRaises(XmpValueError, tag._convert_to_python(None, 'Text'))
 
252
        self.assertRaises(XmpValueError, tag._convert_to_python, None, 'Text')
253
253
 
254
254
    def test_convert_to_string_text(self):
255
255
        # Valid values