Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/testing/plugin/__pycache__/test_ipdoctest.cpython-39.pyc
Ðазад
a o�hs � @ s0 d Z dd� Zdd� Zdd� Zdd� Zd d � ZdS )ap Tests for the ipdoctest machinery itself. Note: in a file named test_X, functions whose only test is their docstring (as a doctest) and which have no test functionality of their own, should be called 'doctest_foo' instead of 'test_foo', otherwise they get double-counted (the empty function call is counted as a test, which just inflates tests numbers artificially). c C s dS )zeipdoctest must handle simple inputs In [1]: 1 Out[1]: 1 In [2]: print(1) 1 N� r r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/testing/plugin/test_ipdoctest.py�doctest_simple s r c C s dS )z�The ipdoctest machinery must handle multiline examples gracefully. In [2]: for i in range(4): ...: print(i) ...: 0 1 2 3 Nr r r r r �doctest_multiline1 s r c C s dS )a0 Multiline examples that define functions and print output. In [7]: def f(x): ...: return x+1 ...: In [8]: f(1) Out[8]: 2 In [9]: def g(x): ...: print('x is:',x) ...: In [10]: g(1) x is: 1 In [11]: g('hello') x is: hello Nr r r r r �doctest_multiline2 s r c C s dS )a� Multiline examples with blank lines. In [12]: def h(x): ....: if x>1: ....: return x**2 ....: # To leave a blank line in the input, you must mark it ....: # with a comment character: ....: # ....: # otherwise the doctest parser gets confused. ....: else: ....: return -1 ....: In [13]: h(5) Out[13]: 25 In [14]: h(1) Out[14]: -1 In [15]: h(0) Out[15]: -1 Nr r r r r �doctest_multiline36 s r c C s dS )a Defining builtins._ should not break anything outside the doctest while also should be working as expected inside the doctest. In [1]: import builtins In [2]: builtins._ = 42 In [3]: builtins._ Out[3]: 42 In [4]: _ Out[4]: 42 Nr r r r r �doctest_builtin_underscoreO s r N)�__doc__r r r r r r r r r �<module> s
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка