Skip to content

Commit 127b176

Browse files
Restore doctest showing hidden rests
1 parent 9b4d236 commit 127b176

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

music21/musicxml/m21ToXml.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,14 @@ def fromGeneralObject(self, obj):
469469
470470
Changed in v8 -- fills gaps with rests before calling makeNotation
471471
to avoid duplicating effort with :meth:`PartExporter.fixupNotationMeasured`.
472+
473+
>>> v = stream.Voice(note.Note())
474+
>>> m = stream.Measure([meter.TimeSignature(), v])
475+
>>> GEX = musicxml.m21ToXml.GeneralObjectExporter(m)
476+
>>> out = GEX.parse() # out is bytes
477+
>>> outStr = out.decode('utf-8') # now is string
478+
>>> '<note print-object="no" print-spacing="yes">' in outStr
479+
True
472480
'''
473481
classes = obj.classes
474482
outObj = None

0 commit comments

Comments
 (0)