def setUp(self): # A fresh module needs to be imported for each test because the # registry stores its state in the module which is by default # only loaded once. self.module = import_fresh_module('skbio.io._registry') self.fd1, self.fp1 = mkstemp() self.fd2, self.fp2 = mkstemp()
def setUp(self): self.module = import_fresh_module('skbio.io._registry') self.fd1, self.fp1 = mkstemp() self.fd2, self.fp2 = mkstemp()
# The full license is in the file COPYING.txt, distributed with this software. # ---------------------------------------------------------------------------- from __future__ import absolute_import, division, print_function try: # future >= 0.12 from future.backports.test.support import import_fresh_module except ImportError: from future.standard_library.test.support import import_fresh_module import unittest import warnings import numpy as np cy_subsample = import_fresh_module('skbio.stats._subsample', fresh=['skbio.stats.__subsample']) py_subsample = import_fresh_module('skbio.stats._subsample', blocked=['skbio.stats.__subsample']) def setup(): """Ignore warnings during tests.""" warnings.simplefilter("ignore") def teardown(): """Clear the list of warning filters, so that no filters are active.""" warnings.resetwarnings() class SubsampleTests(object):
try: # future >= 0.12 from future.backports.test.support import import_fresh_module except ImportError: from future.standard_library.test.support import import_fresh_module import unittest import warnings import numpy as np import numpy.testing as npt from skbio.stats import isubsample cy_subsample = import_fresh_module('skbio.stats._subsample', fresh=['skbio.stats.__subsample']) py_subsample = import_fresh_module('skbio.stats._subsample', blocked=['skbio.stats.__subsample']) def setup(): """Ignore warnings during tests.""" warnings.simplefilter("ignore") def teardown(): """Clear the list of warning filters, so that no filters are active.""" warnings.resetwarnings() class SubsampleCountsTests(object):
# ---------------------------------------------------------------------------- from __future__ import absolute_import, division, print_function try: # future >= 0.12 from future.backports.test.support import import_fresh_module except ImportError: from future.standard_library.test.support import import_fresh_module import unittest import warnings import numpy as np cy_subsample = import_fresh_module('skbio.math.subsample', fresh=['skbio.math._subsample']) py_subsample = import_fresh_module('skbio.math.subsample', blocked=['skbio.math._subsample']) def setup(): """Ignore warnings during tests.""" warnings.simplefilter("ignore") def teardown(): """Clear the list of warning filters, so that no filters are active.""" warnings.resetwarnings() class SubsampleTests(object):