Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed May 11, 2023
1 parent d5a761f commit 560cd47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion music21/musicxml/m21ToXml.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def parseWellformedObject(self, sc: stream.Score) -> bytes:
def fromGeneralObject(self, obj: prebase.ProtoM21Object):
'''
Converts any Music21Object (or a duration or a pitch) to something that
can be passed to ScoreExporter()
can be passed to :class:`ScoreExporter`.
>>> GEX = musicxml.m21ToXml.GeneralObjectExporter()
>>> s = GEX.fromGeneralObject(duration.Duration(3.0))
Expand All @@ -491,6 +491,8 @@ def fromGeneralObject(self, obj: prebase.ProtoM21Object):
>>> outStr = out.decode('utf-8') # now is string
>>> '<note print-object="no" print-spacing="yes">' in outStr
True
>>> len(v[note.Rest]) # original stream unchanged
0
'''
classes = obj.classes
outObj = None
Expand Down

0 comments on commit 560cd47

Please sign in to comment.