Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent too large <backup> values in PartStaffExporter #1375

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

jacobtylerwalls
Copy link
Member

The PartStaffExporter was producing <duration> values under <backup> tags that were too large by summing the durations of all chord members (instead of just taking one of the durations).

Adds a regression test failing on master:

======================================================================
FAIL: testBackupAmount (__main__.Test.testBackupAmount)
Regression test for chord members causing too-large backup amounts.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jacobwalls/music21/music21/musicxml/partStaffExporter.py", line 1079, in testBackupAmount
    self.assertEqual(
AssertionError: '30240' != '10080'
- 30240
+ 10080


----------------------------------------------------------------------
Ran 21 tests in 2.173s

FAILED (failures=1)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 93.023% when pulling 95ef0de on jacobtylerwalls:too-large-backup into 1a0ec50 on cuthbertLab:master.

Copy link
Member

@mscuthbert mscuthbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@mscuthbert mscuthbert merged commit cb04dd0 into cuthbertLab:master Aug 15, 2022
@jacobtylerwalls jacobtylerwalls deleted the too-large-backup branch August 15, 2022 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants