aboutsummaryrefslogtreecommitdiffstats
path: root/test/encoding.py
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2011-08-01 10:52:30 +0200
committerOlivier Tilloy <olivier@tilloy.net>2011-08-01 10:52:30 +0200
commitb417529c0c977f8b27eb0d2ec4b734514a15eea0 (patch)
tree03189d82ae9ada34656e0b9593d2f488639af74a /test/encoding.py
parent4daceb8502489a56db1eb8159a88f3f23f33949f (diff)
downloadpyexiv2-b417529c0c977f8b27eb0d2ec4b734514a15eea0.tar.gz
Do not try (and fail!) to encode non-unicode filenames.
More complete unit tests.
Diffstat (limited to 'test/encoding.py')
-rw-r--r--test/encoding.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/encoding.py b/test/encoding.py
index 9cc251f..f82d3ac 100644
--- a/test/encoding.py
+++ b/test/encoding.py
@@ -91,18 +91,24 @@ class TestEncodings(unittest.TestCase):
m.read()
os.remove(filename)
- def test_ascii_str(self):
+ def test_ascii(self):
self._test_filename('test.jpg')
- def test_ascii_unicode(self):
+ def test_latin1(self):
+ self._test_filename('tést.jpg')
+
+ def test_latin1_escaped(self):
+ self._test_filename('t\xc3\xa9st.jpg')
+
+ def test_unicode_ascii(self):
if self.encoding is not None:
self._test_filename(u'test.jpg')
- def test_nonascii_unicode(self):
+ def test_unicode_latin1(self):
if self.encoding is not None:
self._test_filename(u'tést.jpg')
- def test_nonascii_unicode_escaped(self):
+ def test_unicode_latin1_escaped(self):
if self.encoding is not None:
self._test_filename(u't\xe9st.jpg')