/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
numpy
/
core
/
tests
/
/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests
mkdir
upload
Name
Size
Mode
Actions
data/
-
0755
rm
__pycache__/
-
0755
rm
test_abc.py
2014
0644
edit
dl
rm
test_api.py
18906
0644
edit
dl
rm
test_arrayprint.py
10215
0644
edit
dl
rm
test_datetime.py
92527
0644
edit
dl
rm
test_defchararray.py
25764
0644
edit
dl
rm
test_deprecations.py
18802
0644
edit
dl
rm
test_dtype.py
26202
0644
edit
dl
rm
test_einsum.py
39598
0644
edit
dl
rm
test_errstate.py
1588
0644
edit
dl
rm
test_extint128.py
5774
0644
edit
dl
rm
test_function_base.py
11429
0644
edit
dl
rm
test_getlimits.py
4613
0644
edit
dl
rm
test_half.py
18648
0644
edit
dl
rm
test_indexerrors.py
4938
0644
edit
dl
rm
test_indexing.py
47966
0644
edit
dl
rm
test_item_selection.py
3665
0644
edit
dl
rm
test_longdouble.py
5967
0644
edit
dl
rm
test_machar.py
1014
0644
edit
dl
rm
test_memmap.py
7075
0644
edit
dl
rm
test_mem_overlap.py
29564
0644
edit
dl
rm
test_multiarray.py
260805
0644
edit
dl
rm
test_nditer.py
108283
0644
edit
dl
rm
test_numeric.py
100854
0644
edit
dl
rm
test_numerictypes.py
14610
0644
edit
dl
rm
test_print.py
8089
0644
edit
dl
rm
test_records.py
15635
0644
edit
dl
rm
test_regression.py
81211
0644
edit
dl
rm
test_scalarinherit.py
771
0644
edit
dl
rm
test_scalarmath.py
25033
0644
edit
dl
rm
test_scalarprint.py
917
0644
edit
dl
rm
test_shape_base.py
18544
0644
edit
dl
rm
test_ufunc.py
54985
0644
edit
dl
rm
test_umath.py
98785
0644
edit
dl
rm
test_umath_complex.py
19800
0644
edit
dl
rm
test_unicode.py
14238
0644
edit
dl
rm
Edit:
/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests/test_scalarinherit.py
(771B)
# -*- coding: utf-8 -*- """ Test printing of scalar types. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_ class A(object): pass class B(A, np.float64): pass class C(B): pass class D(C, B): pass class B0(np.float64, A): pass class C0(B0): pass class TestInherit(TestCase): def test_init(self): x = B(1.0) assert_(str(x) == '1.0') y = C(2.0) assert_(str(y) == '2.0') z = D(3.0) assert_(str(z) == '3.0') def test_init2(self): x = B0(1.0) assert_(str(x) == '1.0') y = C0(2.0) assert_(str(y) == '2.0') if __name__ == "__main__": run_module_suite()
Save
cmd:
run