ref: a1bf01df14dcdcda19d59db47e2b8a3e632e69ca
parent: d98f3c0edde3838f1f6e9fa856dac1bbe1f1631a
author: Paul Brossier <piem@piem.org>
date: Mon Nov 28 13:18:49 EST 2016
python/tests/: use local import, create __init__.py
--- /dev/null
+++ b/python/tests/__init__.py
@@ -1,0 +1,1 @@
+
--- a/python/tests/eval_pitch
+++ b/python/tests/eval_pitch
@@ -24,7 +24,7 @@
import time
import os.path
import numpy
-from utils import array_from_text_file, array_from_yaml_file
+from .utils import array_from_text_file, array_from_yaml_file
from aubio import source, pitch, freqtomidi
start = time.time()
--- a/python/tests/test_filter.py
+++ b/python/tests/test_filter.py
@@ -3,7 +3,7 @@
from unittest import main
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
@@ -5,7 +5,7 @@
from numpy.testing import assert_equal, assert_almost_equal
import numpy as np
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_sink.py
+++ b/python/tests/test_sink.py
@@ -4,7 +4,7 @@
from nose2.tools import params
from numpy.testing import TestCase
from aubio import fvec, source, sink
-from utils import list_all_sounds, get_tmp_sink_path, del_tmp_sink_path
+from .utils import list_all_sounds, get_tmp_sink_path, del_tmp_sink_path
list_of_sounds = list_all_sounds('sounds')
samplerates = [0, 44100, 8000, 32000]
--- a/python/tests/test_slicing.py
+++ b/python/tests/test_slicing.py
@@ -3,8 +3,8 @@
from unittest import main
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
--- a/python/tests/test_source.py
+++ b/python/tests/test_source.py
@@ -4,7 +4,7 @@
from nose2.tools import params
from numpy.testing import TestCase, assert_equal
from aubio import source
-from utils import list_all_sounds
+from .utils import list_all_sounds
import numpy as np
import warnings