Skip to content

Commit

Permalink
Update RythmExtractor unit tests
Browse files Browse the repository at this point in the history
Closes MTG#3
  • Loading branch information
palonso committed Jul 25, 2019
1 parent 1c5f50e commit 8be21e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/src/unittests/rhythm/test_rhythmextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def testImpulseTrain(self):
#self.assertEqualVector(result[4], expectedRubatoStop)

# impulse train at 90bpm no offset
impulseTrain90 = self.pulseTrain(bpm=60., sr=44100., offset=0., dur=20.)
impulseTrain90 = self.pulseTrain(bpm=90., sr=44100., offset=0., dur=20.)

# impulse train at 200bpm with offset
impulseTrain200 = self.pulseTrain(bpm=200., sr=44100., offset=.2, dur=10.)
Expand All @@ -283,7 +283,7 @@ def testImpulseTrain(self):
self.assertAlmostEqual(result[0], expectedBpm, .5)

# ticks
self.assertVectorWithinVectorFixedPrecision(result[1], expectedTicks, 1)
self.assertVectorWithinVector(result[1], expectedTicks, 0.03)

# bpm estimates
for i in range(len(result[2])):
Expand Down Expand Up @@ -314,10 +314,8 @@ def testImpulseTrain(self):
# bpm estimates
self.assertVectorWithinVector(result[2], expectedBpmVector, 0.5)

# ticks # TODO ticks results fail test
self.assertVectorWithinVector(result[1], expectedTicks, 0.03)

# bpm intervals # TODO ticks results fail test
self.assertVectorWithinVector(result[3], expectedBpmIntervals, 0.5)

## rubato start/stop
Expand Down

0 comments on commit 8be21e2

Please sign in to comment.