$17 GRAYBYTE WORDPRESS FILE MANAGER $57

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/numpy/polynomial/tests/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/numpy/polynomial/tests//test_printing.py
from __future__ import division, absolute_import, print_function

import numpy.polynomial as poly
from numpy.testing import TestCase, run_module_suite, assert_


class test_str(TestCase):
    def test_polynomial_str(self):
        res = str(poly.Polynomial([0, 1]))
        tgt = 'poly([0., 1.])'
        assert_(res, tgt)

    def test_chebyshev_str(self):
        res = str(poly.Chebyshev([0, 1]))
        tgt = 'leg([0., 1.])'
        assert_(res, tgt)

    def test_legendre_str(self):
        res = str(poly.Legendre([0, 1]))
        tgt = 'leg([0., 1.])'
        assert_(res, tgt)

    def test_hermite_str(self):
        res = str(poly.Hermite([0, 1]))
        tgt = 'herm([0., 1.])'
        assert_(res, tgt)

    def test_hermiteE_str(self):
        res = str(poly.HermiteE([0, 1]))
        tgt = 'herme([0., 1.])'
        assert_(res, tgt)

    def test_laguerre_str(self):
        res = str(poly.Laguerre([0, 1]))
        tgt = 'lag([0., 1.])'
        assert_(res, tgt)


class test_repr(TestCase):
    def test_polynomial_str(self):
        res = repr(poly.Polynomial([0, 1]))
        tgt = 'Polynomial([0., 1.])'
        assert_(res, tgt)

    def test_chebyshev_str(self):
        res = repr(poly.Chebyshev([0, 1]))
        tgt = 'Chebyshev([0., 1.], [-1., 1.], [-1., 1.])'
        assert_(res, tgt)

    def test_legendre_repr(self):
        res = repr(poly.Legendre([0, 1]))
        tgt = 'Legendre([0., 1.], [-1., 1.], [-1., 1.])'
        assert_(res, tgt)

    def test_hermite_repr(self):
        res = repr(poly.Hermite([0, 1]))
        tgt = 'Hermite([0., 1.], [-1., 1.], [-1., 1.])'
        assert_(res, tgt)

    def test_hermiteE_repr(self):
        res = repr(poly.HermiteE([0, 1]))
        tgt = 'HermiteE([0., 1.], [-1., 1.], [-1., 1.])'
        assert_(res, tgt)

    def test_laguerre_repr(self):
        res = repr(poly.Laguerre([0, 1]))
        tgt = 'Laguerre([0., 1.], [0., 1.], [0., 1.])'
        assert_(res, tgt)


#

if __name__ == "__main__":
    run_module_suite()

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 3.40 AM
root / root
0755
__pycache__
--
31 Aug 2024 3.40 AM
root / root
0755
test_chebyshev.py
19.077 KB
25 Apr 2023 2.30 AM
root / root
0644
test_classes.py
17.855 KB
25 Apr 2023 2.30 AM
root / root
0644
test_hermite.py
17.868 KB
25 Apr 2023 2.30 AM
root / root
0644
test_hermite_e.py
18.185 KB
25 Apr 2023 2.30 AM
root / root
0644
test_laguerre.py
16.838 KB
25 Apr 2023 2.30 AM
root / root
0644
test_legendre.py
17.584 KB
25 Apr 2023 2.30 AM
root / root
0644
test_polynomial.py
18.64 KB
25 Apr 2023 2.30 AM
root / root
0644
test_polyutils.py
3.021 KB
25 Apr 2023 2.30 AM
root / root
0644
test_printing.py
1.957 KB
25 Apr 2023 2.30 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF