Fixed database typo and removed unnecessary class identifier.

This commit is contained in:
Batuhan Berk Başoğlu 2020-10-14 10:10:37 -04:00
parent 00ad49a143
commit 45fb349a7d
5098 changed files with 952558 additions and 85 deletions

View file

@ -0,0 +1,45 @@
import sys
import subprocess
PUBLIC_SUBMODULES = [
'cluster',
'cluster.hierarchy',
'cluster.vq',
'constants',
'fft',
'fftpack',
'fftpack.convolve',
'integrate',
'interpolate',
'io',
'io.arff',
'io.wavfile',
'linalg',
'linalg.blas',
'linalg.lapack',
'linalg.interpolative',
'misc',
'ndimage',
'odr',
'optimize',
'signal',
'sparse',
'sparse.csgraph',
'sparse.linalg',
'spatial',
'spatial.distance',
'special',
'stats',
'stats.mstats',
]
def test_importing_submodules():
# Regression test for gh-6793.
for name in PUBLIC_SUBMODULES:
try:
cmd = [sys.executable, '-c', 'import scipy.{0}'.format(name)]
subprocess.check_output(cmd)
except subprocess.CalledProcessError:
raise AssertionError('Importing scipy.{0} failed'.format(name))

View file

@ -0,0 +1,18 @@
import re
import scipy
from numpy.testing import assert_
def test_valid_scipy_version():
# Verify that the SciPy version is a valid one (no .post suffix or other
# nonsense). See NumPy issue gh-6431 for an issue caused by an invalid
# version.
version_pattern = r"^[0-9]+\.[0-9]+\.[0-9]+(|a[0-9]|b[0-9]|rc[0-9])"
dev_suffix = r"(\.dev0\+([0-9a-f]{7}|Unknown))"
if scipy.version.release:
res = re.match(version_pattern, scipy.__version__)
else:
res = re.match(version_pattern + dev_suffix, scipy.__version__)
assert_(res is not None, scipy.__version__)