Skip to content

Commit

Permalink
Fix order of operations issue in sliding window test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnVinyard committed Apr 7, 2018
1 parent 4ac64e9 commit b501b53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions zounds/timeseries/test_audiosamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ def test_sliding_window_dimensions(self):
samples = AudioSamples.silence(SR11025(), Seconds(10))
window_sr = SampleRate(
duration=samplerate.frequency * 512,
frequency=samplerate.frequency * 512 - 25)
print window_sr
frequency=samplerate.frequency * (512 - 25))
windowed = samples.sliding_window(window_sr)
self.assertEqual(window_sr, windowed.dimensions[0].samplerate)

def test_expanding_first_dimension_should_create_identity_dimension(self):
silence = AudioSamples.silence(SR11025(), Seconds(10))
expanded = silence[None, ...]
print expanded.dimensions
self.assertEqual(2, len(expanded.dimensions))
self.assertIsInstance(expanded.dimensions[0], IdentityDimension)
self.assertEqual(silence.dimensions[0], expanded.dimensions[1])
Expand Down

0 comments on commit b501b53

Please sign in to comment.