diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/ipython/py2/IPython/testing/skipdoctest.py | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/python/ipython/py2/IPython/testing/skipdoctest.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/testing/skipdoctest.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/contrib/python/ipython/py2/IPython/testing/skipdoctest.py b/contrib/python/ipython/py2/IPython/testing/skipdoctest.py deleted file mode 100644 index 564ca54027..0000000000 --- a/contrib/python/ipython/py2/IPython/testing/skipdoctest.py +++ /dev/null @@ -1,43 +0,0 @@ -"""Decorators marks that a doctest should be skipped, for both python 2 and 3. - -The IPython.testing.decorators module triggers various extra imports, including -numpy and sympy if they're present. Since this decorator is used in core parts -of IPython, it's in a separate module so that running IPython doesn't trigger -those imports.""" - -#----------------------------------------------------------------------------- -# Copyright (C) 2009-2011 The IPython Development Team -# -# Distributed under the terms of the BSD License. The full license is in -# the file COPYING, distributed as part of this software. -#----------------------------------------------------------------------------- - -#----------------------------------------------------------------------------- -# Imports -#----------------------------------------------------------------------------- - -import sys - -#----------------------------------------------------------------------------- -# Decorators -#----------------------------------------------------------------------------- - -def skip_doctest(f): - """Decorator - mark a function or method for skipping its doctest. - - This decorator allows you to mark a function whose docstring you wish to - omit from testing, while preserving the docstring for introspection, help, - etc.""" - f.skip_doctest = True - return f - - -def skip_doctest_py3(f): - """Decorator - skip the doctest under Python 3.""" - f.skip_doctest = (sys.version_info[0] >= 3) - return f - -def skip_doctest_py2(f): - """Decorator - skip the doctest under Python 3.""" - f.skip_doctest = (sys.version_info[0] < 3) - return f |