aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.ru>2022-05-18 00:43:36 +0300
committerrobot-contrib <robot-contrib@yandex-team.ru>2022-05-18 00:43:36 +0300
commit9e5f436a8b2a27bcc7802e443ea3ef3e41a82a75 (patch)
tree78b522cab9f76336e62064d4d8ff7c897659b20e /contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py
parent8113a823ffca6451bb5ff8f0334560885a939a24 (diff)
downloadydb-9e5f436a8b2a27bcc7802e443ea3ef3e41a82a75.tar.gz
Update contrib/python/ipython/py3 to 8.3.0
ref:e84342d4d30476f9148137f37fd0c6405fd36f55
Diffstat (limited to 'contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py')
-rw-r--r--contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py40
1 files changed, 25 insertions, 15 deletions
diff --git a/contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py b/contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py
index d73cd246fd..68f7016e34 100644
--- a/contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py
+++ b/contrib/python/ipython/py3/IPython/testing/plugin/dtexample.py
@@ -4,6 +4,9 @@ This file just contains doctests both using plain python and IPython prompts.
All tests should be loaded by nose.
"""
+import os
+
+
def pyfunc():
"""Some pure python tests...
@@ -35,20 +38,8 @@ def ipfunc():
....: print(i, end=' ')
....: print(i+1, end=' ')
....:
- 0 1 1 2 2 3
-
-
- Examples that access the operating system work:
-
- In [1]: !echo hello
- hello
+ 0 1 1 2 2 3
- In [2]: !echo hello > /tmp/foo_iptest
-
- In [3]: !cat /tmp/foo_iptest
- hello
-
- In [4]: rm -f /tmp/foo_iptest
It's OK to use '_' for the last result, but do NOT try to use IPython's
numbered history of _NN outputs, since those won't exist under the
@@ -59,7 +50,7 @@ def ipfunc():
In [8]: print(repr(_))
'hi'
-
+
In [7]: 3+4
Out[7]: 7
@@ -69,7 +60,26 @@ def ipfunc():
In [9]: ipfunc()
Out[9]: 'ipfunc'
"""
- return 'ipfunc'
+ return "ipfunc"
+
+
+def ipos():
+ """Examples that access the operating system work:
+
+ In [1]: !echo hello
+ hello
+
+ In [2]: !echo hello > /tmp/foo_iptest
+
+ In [3]: !cat /tmp/foo_iptest
+ hello
+
+ In [4]: rm -f /tmp/foo_iptest
+ """
+ pass
+
+
+ipos.__skip_doctest__ = os.name == "nt"
def ranfunc():