pymarc 5.2.1__tar.gz → 5.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pymarc-5.2.1/pymarc.egg-info → pymarc-5.2.2}/PKG-INFO +1 -1
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/record.py +1 -1
- {pymarc-5.2.1 → pymarc-5.2.2/pymarc.egg-info}/PKG-INFO +1 -1
- {pymarc-5.2.1 → pymarc-5.2.2}/setup.py +1 -1
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_record.py +2 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/CONTRIBUTING.md +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/LICENSE +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/MANIFEST.in +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/README.md +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/README_pt_Br.md +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/docs/source/conf.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/docs/source/index.rst +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/__init__.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/constants.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/exceptions.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/field.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/leader.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/marc8.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/marc8_mapping.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/marcjson.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/marcxml.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/py.typed +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/reader.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc/writer.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc.egg-info/SOURCES.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc.egg-info/dependency_links.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/pymarc.egg-info/top_level.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/requirements.dev.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/setup.cfg +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/1251.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/__init__.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/alphatag.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_eacc_encoding.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_indicator.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_marc8_escape.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_records.mrc +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_subfield_code.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/bad_tag.xml +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/batch.json +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/batch.xml +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/diacritic.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/marc.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/marc8-to-unicode.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/marc8.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/multi_isbn.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/one.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/one.json +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/regression45.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test.json +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_encode.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_field.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_json.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_leader.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_marc8.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_marc8.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_ordered_fields.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_reader.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_utf8.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_utf8.txt +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_writer.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/test_xml.py +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/testunimarc.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/utf8.xml +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/utf8_errors.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/utf8_invalid.mrc +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/utf8_with_leader_flag.dat +0 -0
- {pymarc-5.2.1 → pymarc-5.2.2}/test/utf8_without_leader_flag.dat +0 -0
|
@@ -105,7 +105,7 @@ class Record:
|
|
|
105
105
|
encoding=file_encoding,
|
|
106
106
|
)
|
|
107
107
|
elif force_utf8:
|
|
108
|
-
self.leader = self.leader[0:9] + "a" + self.leader[10:]
|
|
108
|
+
self.leader = Leader(self.leader[0:9] + "a" + self.leader[10:])
|
|
109
109
|
|
|
110
110
|
def __str__(self) -> str:
|
|
111
111
|
"""Will return a prettified version of the record in MARCMaker format.
|
|
@@ -14,6 +14,7 @@ from pymarc.exceptions import (
|
|
|
14
14
|
from pymarc.field import Field, Subfield, Indicators
|
|
15
15
|
from pymarc.reader import MARCReader
|
|
16
16
|
from pymarc.record import Record
|
|
17
|
+
from pymarc.leader import Leader
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class RecordTest(unittest.TestCase):
|
|
@@ -724,6 +725,7 @@ class RecordTest(unittest.TestCase):
|
|
|
724
725
|
subfields=[Subfield(code="a", value="The pragmatic programmer")],
|
|
725
726
|
)
|
|
726
727
|
)
|
|
728
|
+
self.assertTrue(isinstance(record.leader, Leader))
|
|
727
729
|
transmission_format = record.as_marc()
|
|
728
730
|
transmission_format_leader = transmission_format[0:24]
|
|
729
731
|
self.assertEqual(transmission_format_leader, b"00067 a2200037 4500")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|