From eae62be9578de9417f5a9ef8b0c1348023db4c0a Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Mon, 20 Feb 2017 17:15:49 +0100 Subject: [PATCH] Replace definition of test_docstrings with an import from wafo.testing. --- wafo/misc.py | 11 ++--------- wafo/sg_filter/_core.py | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/wafo/misc.py b/wafo/misc.py index 43839d8..fa5cb7f 100644 --- a/wafo/misc.py +++ b/wafo/misc.py @@ -3126,13 +3126,6 @@ def fourier(data, t=None, period=None, m=None, n=None, method='trapz'): return a, b -def test_docstrings(): - # np.set_printoptions(precision=6) - import doctest - print('Testing docstrings in %s' % __file__) - doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE | - doctest.ELLIPSIS) - - if __name__ == "__main__": - test_docstrings() + from wafo.testing import test_docstrings + test_docstrings(__file__) diff --git a/wafo/sg_filter/_core.py b/wafo/sg_filter/_core.py index 7e21ca1..aa4c942 100644 --- a/wafo/sg_filter/_core.py +++ b/wafo/sg_filter/_core.py @@ -926,7 +926,8 @@ class Kalman(object): def reset(self): self._filter = self._filter_first - def _none_or_atleast_2d(self, a): + @staticmethod + def _none_or_atleast_2d(a): if a is not None: return np.atleast_2d(a) return a