Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding test to test/marc8.py to try reading a MARC file containing MA…

…RC-8 encoded characters. Ed's commit e53cd99 causes reading MARC-8 encoded records to fail, since the utf8 codec can't handle all MARC-8 characters.
  • Loading branch information...
commit cc942e07ef0cf7cc60d1988ac898b93cdfc07f4e 1 parent 3631bbf
@anarchivist anarchivist authored
Showing with 6 additions and 0 deletions.
  1. +1 −0  test/marc8.dat
  2. +5 −0 test/marc8.py
View
1  test/marc8.dat
@@ -0,0 +1 @@
+01117cam 2200349 a 4500001000200000005001700002008004100019010003200060035002000092035001300112040001000125041001100135049004700146049004000193050001700233090002300250100002000273240004800293245008000341260004700421300002100468500005300489504005400542650001600596650001000612650002300622650001600645650002200661730004800683951001100731957002500742219900316000000.0840112s1962 pau b 00010 eng  a 61014599/L/r83o00204096 aocmDCLC6114599B 9AAA-0425 dPPT-M1 aengund98aTMYMbBF575.L7 T68 1962c1z39074500724638 aPPCMc1lFred B. Rogers, M.D.oGift0 aBF697b.T623 aBF575.L7bT68 196210aTournier, Paul.10aDe la solitude �a la communaut�e.lEnglish.10aEscape from loneliness /cby Paul Tournier ; translated by John S. Gilmour.0 aPhiladelphia :bWestminster Press,cc1962. a192 p. ;c21 cm. aTranslation of De la solitude �a la communaut�e. aIncludes bibliographical references (p. 190-192). 0aLoneliness. 0aSelf. 0aSocial psychology. 2aLoneliness. 2aSocial Isolation.01aDe la solitude �a la communaut�e.lEnglish. x070101 aBF 575.L7 T728d 1962
View
5 test/marc8.py
@@ -4,6 +4,11 @@
from pymarc import marc8_to_unicode, Field, Record, MARCReader, MARCWriter
class MARC8Test(TestCase):
+
+ def test_marc8_reader(self):
+ marc8_file = file('test/marc8.dat')
+ reader = MARCReader(marc8_file)
+ self.assertEquals(type(reader.next()), Record)
def test_marc8_to_unicode(self):
marc8_file = file('test/test_marc8.txt')
Please sign in to comment.
Something went wrong with that request. Please try again.