Permalink
Browse files

added codecs test

  • Loading branch information...
1 parent 46fcfb4 commit 56cea78c8cd5753dc99896c8661a76d92bca13fb @edsu committed Jul 9, 2008
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/reader.py
View
@@ -49,6 +49,13 @@ def test_url(self):
record = reader.next()
self.assertEqual(record['245']['a'], 'Python pocket reference /')
+ def test_codecs(self):
+ import codecs
+ reader = pymarc.MARCReader(codecs.open('test/test.dat',
+ encoding='utf-8'))
+ record = reader.next()
+ self.assertEqual(record['245']['a'], u'ActivePerl with ASP and ADO /')
+
class MARCReaderStringTest(MARCReaderFileTest):
def setUp(self):

0 comments on commit 56cea78

Please sign in to comment.