$45 GRAYBYTE WORDPRESS FILE MANAGER $67

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 88.222.243.148 | ADMIN IP 216.73.216.143
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/test/

HOME
Current File : /opt/alt/python37/lib64/python3.7/site-packages/guppy/heapy/test//test_OutputHandling.py
from guppy.heapy.test import support


class FirstCase(support.TestCase):
    def setUp(self):
        support.TestCase.setUp(self)
        self.OH = self.heapy.OutputHandling

    def test_1(self):
        class T:
            def __init__(self, test, numlines, get_num_lines=None, get_more_msg=None):
                mod = test.OH

                def get_line_iter():
                    for i in range(numlines):
                        yield '%d' % i

                self.mod = mod
                self.more = mod.more_printer(
                    self,
                    get_line_iter=get_line_iter,
                    max_top_lines=4,
                    max_more_lines=3,
                    get_num_lines=get_num_lines,
                    get_more_msg=get_more_msg)

            def __repr__(self):
                return self.more._oh_printer.get_str_of_top()

        self.aseq(str(T(self, 4)), '0\n1\n2\n3')

        t = T(self, 6, lambda: 6)

        self.aseq(
            str(t), "0\n1\n2\n3\n<Lines 0..3 of 6. Type e.g. '_.more' for more.>")
        x = t.more
        self.aseq(str(x), '4\n5')
        self.aseq(
            str(x.top), "0\n1\n2\n3\n<Lines 0..3 of 6. Type e.g. '_.more' for more.>")

        t = T(self, 6, get_more_msg=lambda f, t: '<%d more rows>' % (6-t))
        self.aseq(str(t), '0\n1\n2\n3\n<3 more rows>')


def test_main(debug=0):
    support.run_unittest(FirstCase, debug)


if __name__ == "__main__":
    test_main()

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.26 PM
root / 996
0755
__pycache__
--
25 Jan 2024 4.26 PM
root / 996
0755
__init__.py
0.046 KB
21 Nov 2019 9.31 PM
root / 996
0644
support.py
3.145 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_Classifiers.py
27.91 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_ER.py
10.173 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_OutputHandling.py
1.433 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_Part.py
4.378 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_Path.py
27.946 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_RefPat.py
16.593 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_RetaGraph.py
0.093 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_Spec.py
0.343 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_UniSet.py
1.212 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_View.py
7.988 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_all.py
0.666 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_dependencies.py
0.209 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_gsl.py
0.411 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_heapyc.py
15.598 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_menuleak.py
3.121 KB
21 Nov 2019 9.31 PM
root / 996
0644
test_sf.py
0.569 KB
21 Nov 2019 9.31 PM
root / 996
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF