shithub: aubio

Download patch

ref: d4fae3481377389b5bc2368f8c74fb8d14cf1c52
parent: 7debeb6f1983e6464c9c72ebe55fe734fe84b6ca
author: Paul Brossier <piem@piem.org>
date: Thu Nov 1 19:55:25 EDT 2018

[tests] remove __init__.py, use absolute imports

--- a/python/tests/__init__.py
+++ /dev/null
@@ -1,1 +1,0 @@
-
--- a/python/tests/test_filter.py
+++ b/python/tests/test_filter.py
@@ -2,7 +2,7 @@
 
 from numpy.testing import TestCase, assert_equal, assert_almost_equal
 from aubio import fvec, digital_filter
-from .utils import array_from_text_file
+from utils import array_from_text_file
 
 class aubio_filter_test_case(TestCase):
 
--- a/python/tests/test_filterbank.py
+++ b/python/tests/test_filterbank.py
@@ -4,7 +4,7 @@
 from numpy.testing import TestCase, assert_equal, assert_almost_equal
 
 from aubio import cvec, filterbank, float_type
-from .utils import array_from_text_file
+from utils import array_from_text_file
 
 class aubio_filterbank_test_case(TestCase):
 
--- a/python/tests/test_mfcc.py
+++ b/python/tests/test_mfcc.py
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-from ._tools import parametrize, assert_raises
+from _tools import parametrize, assert_raises
 from numpy import random, count_nonzero
 from numpy.testing import TestCase
 from aubio import mfcc, cvec, float_type
--- a/python/tests/test_midi2note.py
+++ b/python/tests/test_midi2note.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 
 from aubio import midi2note
-from ._tools import parametrize, assert_raises
+from _tools import parametrize, assert_raises
 
 list_of_known_midis = (
         ( 0, 'C-1' ),
--- a/python/tests/test_note2midi.py
+++ b/python/tests/test_note2midi.py
@@ -5,7 +5,7 @@
 
 from aubio import note2midi, freq2note, note2freq, float_type
 from numpy.testing import TestCase
-from ._tools import parametrize, assert_raises
+from _tools import parametrize, assert_raises
 
 list_of_known_notes = (
         ( 'C-1', 0 ),
--- a/python/tests/test_notes.py
+++ b/python/tests/test_notes.py
@@ -3,7 +3,7 @@
 from numpy.testing import TestCase, assert_equal, assert_almost_equal
 from aubio import notes, source
 import numpy as np
-from .utils import list_all_sounds
+from utils import list_all_sounds
 
 list_of_sounds = list_all_sounds('sounds')
 
--- a/python/tests/test_phasevoc.py
+++ b/python/tests/test_phasevoc.py
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 
 from numpy.testing import TestCase, assert_equal, assert_array_less
-from ._tools import parametrize
+from _tools import parametrize
 from aubio import fvec, cvec, pvoc, float_type
 import numpy as np
 
--- a/python/tests/test_slicing.py
+++ b/python/tests/test_slicing.py
@@ -2,8 +2,8 @@
 
 from numpy.testing import TestCase, assert_equal
 from aubio import slice_source_at_stamps
-from .utils import count_files_in_directory, get_default_test_sound
-from .utils import count_samples_in_directory, count_samples_in_file
+from utils import count_files_in_directory, get_default_test_sound
+from utils import count_samples_in_directory, count_samples_in_file
 
 import tempfile
 import shutil