Permalink
Browse files

Merge pull request #9 from lawlesst/master

format_field() in field.py
  • Loading branch information...
2 parents 8d291a4 + 4ae8c2d commit a4ef9b2fb6819a322b96d9e7255dc50b1da1b74d @edsu committed Sep 9, 2011
Showing with 6 additions and 2 deletions.
  1. +2 −0 pymarc/field.py
  2. +4 −2 test/field.py
View
@@ -199,6 +199,8 @@ def format_field(self):
return self.data
fielddata = ''
for subfield in self:
+ if subfield[0] == '6':
+ continue
if not self.is_subject_field():
fielddata += ' %s' % subfield[1]
else:
View
@@ -97,9 +97,11 @@ def test_is_subject_field(self):
self.assertEqual(self.field.is_subject_field(), False)
def test_format_field(self):
- self.assertEqual(self.subjectfield.format_field(),
+ self.subjectfield.add_subfield('6', '880-4')
+ self.assertEqual(self.subjectfield.format_field(),
'Python (Computer program language) -- Poetry.')
- self.assertEqual(self.field.format_field(),
+ self.field.add_subfield('6', '880-1')
+ self.assertEqual(self.field.format_field(),
'Huckleberry Finn: An American Odyssey')
def test_tag_normalize(self):

0 comments on commit a4ef9b2

Please sign in to comment.