Skip to content

Commit e8949d9

Browse files
Fix MusicXML writer tests (we used to write 'none' for None, but now we only write 'none' for Enclosures.NO_ENCLOSURE).
1 parent a7890a2 commit e8949d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

music21/musicxml/m21ToXml.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6165,8 +6165,7 @@ def codaToXml(self, coda: repeat.Coda) -> Element:
61656165
>>> MEX.dump(mxCodaText)
61666166
<direction>
61676167
<direction-type>
6168-
<words default-y="20" enclosure="none"
6169-
justify="center">Coda</words>
6168+
<words default-y="20" justify="center">Coda</words>
61706169
</direction-type>
61716170
</direction>
61726171
'''
@@ -6211,7 +6210,7 @@ def tempoIndicationToXml(self, ti: tempo.TempoIndication) -> Element:
62116210
>>> MEX.dump(MEX.xmlRoot.findall('direction')[1])
62126211
<direction>
62136212
<direction-type>
6214-
<words default-y="45" enclosure="none" font-weight="bold"
6213+
<words default-y="45" font-weight="bold"
62156214
justify="left">slow</words>
62166215
</direction-type>
62176216
</direction>
@@ -6281,7 +6280,7 @@ def tempoIndicationToXml(self, ti: tempo.TempoIndication) -> Element:
62816280
>>> MEX.dump(mxDirection)
62826281
<direction>
62836282
<direction-type>
6284-
<words default-y="45" enclosure="none" font-weight="bold">Andante</words>
6283+
<words default-y="45" font-weight="bold">Andante</words>
62856284
</direction-type>
62866285
</direction>
62876286

music21/musicxml/test_xmlToM21.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,8 @@ def testRehearsalMarks(self):
10641064
self.assertEqual(len(rmIterator), 4)
10651065
self.assertEqual(rmIterator[0].content, 'A')
10661066
self.assertEqual(rmIterator[1].content, 'B')
1067-
self.assertEqual(rmIterator[1].style.enclosure, None)
1067+
self.assertEqual(rmIterator[1].style.enclosure,
1068+
style.Enclosure.NO_ENCLOSURE)
10681069
self.assertEqual(rmIterator[2].content, 'Test')
10691070
self.assertEqual(rmIterator[2].style.enclosure, 'square')
10701071

0 commit comments

Comments
 (0)