limit to 80-character lines

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40121
This commit is contained in:
adrian.sampson 2009-02-07 04:23:52 +00:00
parent 647bd33b8e
commit 7d7c625091

View file

@ -78,22 +78,23 @@ def MakeWritingTest(path, correct_dict, field, testsuffix='_test'):
# ... and that no other field was changed.
else:
# The value should be what it was originally most of the time.
# The value should be what it was originally most of the
# time.
correct = correct_dict[readfield]
# The date field, however, is modified when its components
# change.
if readfield == 'date' and field in ('year', 'month', 'day'):
if readfield=='date' and field in ('year', 'month', 'day'):
try:
correct = datetime.date(
self.value if field == 'year' else correct.year,
self.value if field == 'month' else correct.month,
self.value if field == 'day' else correct.day
self.value if field=='year' else correct.year,
self.value if field=='month' else correct.month,
self.value if field=='day' else correct.day
)
except ValueError:
correct = datetime.date.min
# And vice-versa.
if field == 'date' and readfield in ('year', 'month', 'day'):
if field=='date' and readfield in ('year', 'month', 'day'):
correct = getattr(self.value, readfield)
self.assertEqual(got, correct,
@ -130,8 +131,8 @@ correct_dicts = {
'comp': True
},
# Additional coverage for common cases when "total" fields are unset. Created
# with iTunes.
# Additional coverage for common cases when "total" fields are unset.
# Created with iTunes.
'partial': {
'track': 2,
'tracktotal': 0,