aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py2/IPython/testing
diff options
context:
space:
mode:
authorNikita Slyusarev <nslus@yandex-team.com>2022-02-10 16:46:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:52 +0300
commitcd77cecfc03a3eaf87816af28a33067c4f0cdb59 (patch)
tree1308e0bae862d52e0020d881fe758080437fe389 /contrib/python/ipython/py2/IPython/testing
parentcdae02d225fb5b3afbb28990e79a7ac6c9125327 (diff)
downloadydb-cd77cecfc03a3eaf87816af28a33067c4f0cdb59.tar.gz
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/testing')
-rw-r--r--contrib/python/ipython/py2/IPython/testing/decorators.py4
-rw-r--r--contrib/python/ipython/py2/IPython/testing/globalipapp.py18
-rw-r--r--contrib/python/ipython/py2/IPython/testing/iptest.py10
-rw-r--r--contrib/python/ipython/py2/IPython/testing/plugin/ipdoctest.py16
-rw-r--r--contrib/python/ipython/py2/IPython/testing/skipdoctest.py10
-rw-r--r--contrib/python/ipython/py2/IPython/testing/tools.py16
6 files changed, 37 insertions, 37 deletions
diff --git a/contrib/python/ipython/py2/IPython/testing/decorators.py b/contrib/python/ipython/py2/IPython/testing/decorators.py
index c9807ce70e..26c6478f9e 100644
--- a/contrib/python/ipython/py2/IPython/testing/decorators.py
+++ b/contrib/python/ipython/py2/IPython/testing/decorators.py
@@ -48,7 +48,7 @@ from .ipunittest import ipdoctest, ipdocstring
from IPython.external.decorators import *
# For onlyif_cmd_exists decorator
-from IPython.utils.py3compat import string_types, which, PY2, PY3, PYPY
+from IPython.utils.py3compat import string_types, which, PY2, PY3, PYPY
#-----------------------------------------------------------------------------
# Classes and functions
@@ -339,7 +339,7 @@ skip_known_failure = knownfailureif(True,'This test is known to fail')
known_failure_py3 = knownfailureif(sys.version_info[0] >= 3,
'This test is known to fail on Python 3.')
-cpython2_only = skipif(PY3 or PYPY, "This test only runs on CPython 2.")
+cpython2_only = skipif(PY3 or PYPY, "This test only runs on CPython 2.")
py2_only = skipif(PY3, "This test only runs on Python 2.")
py3_only = skipif(PY2, "This test only runs on Python 3.")
diff --git a/contrib/python/ipython/py2/IPython/testing/globalipapp.py b/contrib/python/ipython/py2/IPython/testing/globalipapp.py
index 3983393112..adcb1dd587 100644
--- a/contrib/python/ipython/py2/IPython/testing/globalipapp.py
+++ b/contrib/python/ipython/py2/IPython/testing/globalipapp.py
@@ -8,11 +8,11 @@ done.
from __future__ import absolute_import
from __future__ import print_function
-# Copyright (c) IPython Development Team.
-# Distributed under the terms of the Modified BSD License.
+# Copyright (c) IPython Development Team.
+# Distributed under the terms of the Modified BSD License.
import sys
-import warnings
+import warnings
from . import tools
@@ -34,9 +34,9 @@ class StreamProxy(io.IOStream):
"""
def __init__(self, name):
- warnings.warn("StreamProxy is deprecated and unused as of IPython 5", DeprecationWarning,
- stacklevel=2,
- )
+ warnings.warn("StreamProxy is deprecated and unused as of IPython 5", DeprecationWarning,
+ stacklevel=2,
+ )
self.name=name
@property
@@ -88,7 +88,7 @@ def start_ipython():
# Create custom argv and namespaces for our IPython to be test-friendly
config = tools.default_config()
- config.TerminalInteractiveShell.simple_prompt = True
+ config.TerminalInteractiveShell.simple_prompt = True
# Create and initialize our test-friendly IPython instance.
shell = TerminalInteractiveShell.instance(config=config,
@@ -128,8 +128,8 @@ def start_ipython():
# Override paging, so we don't require user interaction during the tests.
def nopage(strng, start=0, screen_lines=0, pager_cmd=None):
- if isinstance(strng, dict):
- strng = strng.get('text/plain', '')
+ if isinstance(strng, dict):
+ strng = strng.get('text/plain', '')
print(strng)
page.orig_page = page.pager_page
diff --git a/contrib/python/ipython/py2/IPython/testing/iptest.py b/contrib/python/ipython/py2/IPython/testing/iptest.py
index 4018264125..10d08b9e5a 100644
--- a/contrib/python/ipython/py2/IPython/testing/iptest.py
+++ b/contrib/python/ipython/py2/IPython/testing/iptest.py
@@ -44,10 +44,10 @@ pjoin = path.join
# Enable printing all warnings raise by IPython's modules
-warnings.filterwarnings('ignore', message='.*Matplotlib is building the font cache.*', category=UserWarning, module='.*')
-if sys.version_info > (3,0):
- warnings.filterwarnings('error', message='.*', category=ResourceWarning, module='.*')
-warnings.filterwarnings('error', message=".*{'config': True}.*", category=DeprecationWarning, module='IPy.*')
+warnings.filterwarnings('ignore', message='.*Matplotlib is building the font cache.*', category=UserWarning, module='.*')
+if sys.version_info > (3,0):
+ warnings.filterwarnings('error', message='.*', category=ResourceWarning, module='.*')
+warnings.filterwarnings('error', message=".*{'config': True}.*", category=DeprecationWarning, module='IPy.*')
warnings.filterwarnings('default', message='.*', category=Warning, module='IPy.*')
warnings.filterwarnings('error', message='.*apply_wrapper.*', category=DeprecationWarning, module='.*')
@@ -217,7 +217,7 @@ test_group_names.append('autoreload')
def check_exclusions_exist():
from IPython.paths import get_ipython_package_dir
- from warnings import warn
+ from warnings import warn
parent = os.path.dirname(get_ipython_package_dir())
for sec in test_sections:
for pattern in sec.exclusions:
diff --git a/contrib/python/ipython/py2/IPython/testing/plugin/ipdoctest.py b/contrib/python/ipython/py2/IPython/testing/plugin/ipdoctest.py
index bc750e0efd..8eec1231a9 100644
--- a/contrib/python/ipython/py2/IPython/testing/plugin/ipdoctest.py
+++ b/contrib/python/ipython/py2/IPython/testing/plugin/ipdoctest.py
@@ -26,8 +26,8 @@ import os
import re
import sys
-from testpath import modified_env
-
+from testpath import modified_env
+
from inspect import getmodule
# We are overriding the default doctest runner, so we need to import a few
@@ -41,7 +41,7 @@ from doctest import (REPORTING_FLAGS, REPORT_ONLY_FIRST_FAILURE,
# Third-party modules
from nose.plugins import doctests, Plugin
-from nose.util import anyp, tolist
+from nose.util import anyp, tolist
# Our own imports
from IPython.utils.py3compat import builtin_mod, PY3, getcwd
@@ -140,7 +140,7 @@ class DocTestFinder(doctest.DocTestFinder):
# doctests in extension modules.
# Local shorthands
- from inspect import isroutine, isclass
+ from inspect import isroutine, isclass
# Look for tests in a module's contained objects.
if inspect.ismodule(obj) and self._recurse:
@@ -586,10 +586,10 @@ class IPDocTestRunner(doctest.DocTestRunner,object):
test.globs.update(_ip.user_ns)
- # Override terminal size to standardise traceback format
- with modified_env({'COLUMNS': '80', 'LINES': '24'}):
- return super(IPDocTestRunner,self).run(test,
- compileflags,out,clear_globs)
+ # Override terminal size to standardise traceback format
+ with modified_env({'COLUMNS': '80', 'LINES': '24'}):
+ return super(IPDocTestRunner,self).run(test,
+ compileflags,out,clear_globs)
class DocFileCase(doctest.DocFileCase):
diff --git a/contrib/python/ipython/py2/IPython/testing/skipdoctest.py b/contrib/python/ipython/py2/IPython/testing/skipdoctest.py
index 564ca54027..499ce28e07 100644
--- a/contrib/python/ipython/py2/IPython/testing/skipdoctest.py
+++ b/contrib/python/ipython/py2/IPython/testing/skipdoctest.py
@@ -36,8 +36,8 @@ 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
+
+def skip_doctest_py2(f):
+ """Decorator - skip the doctest under Python 3."""
+ f.skip_doctest = (sys.version_info[0] < 3)
+ return f
diff --git a/contrib/python/ipython/py2/IPython/testing/tools.py b/contrib/python/ipython/py2/IPython/testing/tools.py
index 23bf6a68cb..fbe91abcca 100644
--- a/contrib/python/ipython/py2/IPython/testing/tools.py
+++ b/contrib/python/ipython/py2/IPython/testing/tools.py
@@ -196,7 +196,7 @@ def ipexec(fname, options=None, commands=()):
"""
if options is None: options = []
- cmdargs = default_argv() + options
+ cmdargs = default_argv() + options
test_dir = os.path.dirname(__file__)
@@ -291,13 +291,13 @@ class TempFileMixin(object):
# delete it. I have no clue why
pass
- def __enter__(self):
- return self
-
- def __exit__(self, exc_type, exc_value, traceback):
- self.tearDown()
-
-
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc_value, traceback):
+ self.tearDown()
+
+
pair_fail_msg = ("Testing {0}\n\n"
"In:\n"
" {1!r}\n"