7.24.1: pytest warnings and test suite still uses `nose`
See original GitHub issueI just found that ipython needs matplot not only to generate documentation but test units needs matplot as well. Despite that missing bit in my build env already latest pytest shows some warnings.
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/ipython-7.24.1, configfile: pytest.ini
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, Faker-8.4.0, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1
collected 837 items / 1 error / 836 selected
================================================================================== ERRORS ==================================================================================
__________________________________________________________ ERROR collecting IPython/core/tests/test_pylabtools.py __________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/tests/test_pylabtools.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
IPython/core/tests/test_pylabtools.py:10: in <module>
import matplotlib
E ModuleNotFoundError: No module named 'matplotlib'
============================================================================= warnings summary =============================================================================
IPython/core/inputsplitter.py:21
/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/inputsplitter.py:21: DeprecationWarning: IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`
warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`',
IPython/lib/tests/test_latextools.py:14
IPython/lib/tests/test_latextools.py:14: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_fails_when_no_cmd will be ignored
def test_latex_to_png_dvipng_fails_when_no_cmd():
IPython/lib/tests/test_latextools.py:32
IPython/lib/tests/test_latextools.py:32: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_runs will be ignored
@onlyif_cmds_exist('latex', 'dvipng')
IPython/lib/tests/test_latextools.py:48
IPython/lib/tests/test_latextools.py:48: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_mpl_runs will be ignored
def test_latex_to_png_mpl_runs():
IPython/lib/tests/test_pretty.py:108
IPython/lib/tests/test_pretty.py:108: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_sets will be ignored
def test_sets():
IPython/utils/tests/test_capture.py:70
IPython/utils/tests/test_capture.py:70: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_empty will be ignored
def test_rich_output_empty():
IPython/utils/tests/test_capture.py:76
IPython/utils/tests/test_capture.py:76: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output will be ignored
def test_rich_output():
IPython/utils/tests/test_capture.py:87
IPython/utils/tests/test_capture.py:87: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_no_metadata will be ignored
def test_rich_output_no_metadata():
IPython/utils/tests/test_capture.py:94
IPython/utils/tests/test_capture.py:94: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_metadata will be ignored
def test_rich_output_metadata():
IPython/utils/tests/test_capture.py:102
IPython/utils/tests/test_capture.py:102: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_display will be ignored
def test_rich_output_display():
IPython/utils/tests/test_capture.py:117
IPython/utils/tests/test_capture.py:117: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output will be ignored
def test_capture_output():
IPython/utils/tests/test_capture.py:127
IPython/utils/tests/test_capture.py:127: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_stdout will be ignored
def test_capture_output_no_stdout():
IPython/utils/tests/test_capture.py:138
IPython/utils/tests/test_capture.py:138: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_stderr will be ignored
def test_capture_output_no_stderr():
IPython/utils/tests/test_capture.py:150
IPython/utils/tests/test_capture.py:150: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_display will be ignored
def test_capture_output_no_display():
IPython/utils/tests/test_pycolorize.py:50
IPython/utils/tests/test_pycolorize.py:50: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_loop_colors will be ignored
def test_loop_colors():
IPython/utils/tests/test_tokenutil.py:123
IPython/utils/tests/test_tokenutil.py:123: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_multiline_statement will be ignored
def test_multiline_statement():
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
ERROR IPython/core/tests/test_pylabtools.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================================== 16 warnings, 1 error in 1.76s =======================================================================
Here is full pytest output after add --ignore IPython/core/tests/test_pylabtools.py
to pytest parameters:
+ /usr/bin/pytest -ra --ignore IPython/core/tests/test_pylabtools.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/ipython-7.24.1, configfile: pytest.ini
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, Faker-8.4.0, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1
collected 837 items
. . [ 0%]
IPython/core/tests/test_alias.py .... [ 0%]
IPython/core/tests/test_application.py ... [ 0%]
IPython/core/tests/test_async_helpers.py ........... [ 2%]
IPython/core/tests/test_autocall.py . [ 2%]
IPython/core/tests/test_compilerop.py ...... [ 3%]
IPython/core/tests/test_completer.py ..................................................... [ 9%]
IPython/core/tests/test_completerlib.py ........... [ 10%]
IPython/core/tests/test_debugger.py ..... [ 11%]
IPython/core/tests/test_display.py ........sss............ [ 14%]
IPython/core/tests/test_displayhook.py ....... [ 14%]
IPython/core/tests/test_events.py ...... [ 15%]
IPython/core/tests/test_extension.py ... [ 16%]
IPython/core/tests/test_formatters.py ............................... [ 19%]
IPython/core/tests/test_handlers.py . [ 19%]
IPython/core/tests/test_history.py .s..... [ 20%]
IPython/core/tests/test_hooks.py ... [ 21%]
IPython/core/tests/test_imports.py ................. [ 23%]
IPython/core/tests/test_inputsplitter.py ........................................................................ [ 31%]
IPython/core/tests/test_inputtransformer.py ................. [ 33%]
IPython/core/tests/test_inputtransformer2.py ................. [ 35%]
IPython/core/tests/test_inputtransformer2_line.py ...... [ 36%]
IPython/core/tests/test_interactiveshell.py .......................................................................... [ 45%]
IPython/core/tests/test_iplib.py ... [ 45%]
IPython/core/tests/test_logger.py .. [ 45%]
IPython/core/tests/test_magic.py ................................................F........................................ [ 56%]
IPython/core/tests/test_magic_arguments.py . [ 56%]
IPython/core/tests/test_magic_terminal.py ........... [ 58%]
IPython/core/tests/test_oinspect.py ........................... [ 61%]
IPython/core/tests/test_page.py . [ 61%]
IPython/core/tests/test_paths.py ........... [ 62%]
IPython/core/tests/test_prefilter.py ...... [ 63%]
IPython/core/tests/test_profile.py ..... [ 63%]
IPython/core/tests/test_prompts.py ... [ 64%]
IPython/core/tests/test_run.py ............FF................. [ 68%]
IPython/core/tests/test_shellapp.py ... [ 68%]
IPython/core/tests/test_splitinput.py .. [ 68%]
IPython/core/tests/test_ultratb.py .......................s [ 71%]
IPython/extensions/tests/test_autoreload.py ..... [ 72%]
IPython/extensions/tests/test_storemagic.py .. [ 72%]
IPython/lib/tests/test_backgroundjobs.py .... [ 72%]
IPython/lib/tests/test_clipboard.py s [ 72%]
IPython/lib/tests/test_deepreload.py . [ 73%]
IPython/lib/tests/test_display.py ...........................F [ 76%]
IPython/lib/tests/test_editorhooks.py . [ 76%]
IPython/lib/tests/test_imports.py ... [ 76%]
IPython/lib/tests/test_latextools.py xxxs...s. [ 77%]
IPython/lib/tests/test_lexers.py . [ 78%]
IPython/lib/tests/test_pretty.py ...x........................ [ 81%]
IPython/lib/tests/test_security.py .... [ 81%]
IPython/terminal/tests/test_debug_magic.py . [ 82%]
IPython/terminal/tests/test_embed.py .. [ 82%]
IPython/terminal/tests/test_help.py ......F [ 83%]
IPython/terminal/tests/test_interactivshell.py ........ [ 84%]
IPython/testing/plugin/__init__.py . [ 84%]
IPython/testing/plugin/test_example.txt . [ 84%]
IPython/testing/plugin/test_refs.py . [ 84%]
IPython/testing/tests/test_decorators.py .ss..s.. [ 85%]
IPython/testing/tests/test_ipunittest.py ... [ 85%]
IPython/testing/tests/test_tools.py .s........ [ 86%]
IPython/utils/tests/test_capture.py xxxxxxxxx [ 88%]
IPython/utils/tests/test_decorators.py . [ 88%]
IPython/utils/tests/test_dir2.py .... [ 88%]
IPython/utils/tests/test_imports.py ...... [ 89%]
IPython/utils/tests/test_importstring.py ... [ 89%]
IPython/utils/tests/test_io.py ..... [ 90%]
IPython/utils/tests/test_module_paths.py ...... [ 91%]
IPython/utils/tests/test_openpy.py ... [ 91%]
IPython/utils/tests/test_path.py ss...s.....s.............s [ 94%]
IPython/utils/tests/test_process.py .s..s........ [ 96%]
IPython/utils/tests/test_pycolorize.py x [ 96%]
IPython/utils/tests/test_shimmodule.py . [ 96%]
IPython/utils/tests/test_sysinfo.py . [ 96%]
IPython/utils/tests/test_tempdir.py .. [ 96%]
IPython/utils/tests/test_text.py .............. [ 98%]
IPython/utils/tests/test_tokenutil.py .......x [ 99%]
IPython/utils/tests/test_wildcard.py ...... [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________________ test_notebook_export_json _________________________________________________________________________
def test_notebook_export_json():
_ip = get_ipython()
_ip.history_manager.reset() # Clear any existing history.
cmds = [u"a=1", u"def b():\n return a**2", u"print('noël, été', b())"]
for i, cmd in enumerate(cmds, start=1):
_ip.history_manager.store_inputs(i, cmd)
with TemporaryDirectory() as td:
outfile = os.path.join(td, "nb.ipynb")
> _ip.magic("notebook -e %s" % outfile)
IPython/core/tests/test_magic.py:743:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
IPython/core/interactiveshell.py:2446: in magic
return self.run_line_magic(magic_name, magic_arg_s, _stack_depth=2)
IPython/core/interactiveshell.py:2348: in run_line_magic
result = fn(*args, **kwargs)
/usr/lib/python3.8/site-packages/decorator.py:232: in fun
return caller(func, *(extras + args), **kw)
IPython/core/magic.py:187: in <lambda>
call = lambda f, *a, **k: f(*a, **k)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IPython.core.magics.basic.BasicMagics object at 0x7fd5c9556a60>, s = '-e /tmp/tmpnkb61z0g/nb.ipynb'
@magic_arguments.magic_arguments()
@magic_arguments.argument(
'-e', '--export', action='store_true', default=False,
help=argparse.SUPPRESS
)
@magic_arguments.argument(
'filename', type=str,
help='Notebook name or filename'
)
@line_magic
def notebook(self, s):
"""Export and convert IPython notebooks.
This function can export the current IPython history to a notebook file.
For example, to export the history to "foo.ipynb" do "%notebook foo.ipynb".
The -e or --export flag is deprecated in IPython 5.2, and will be
removed in the future.
"""
args = magic_arguments.parse_argstring(self.notebook, s)
> from nbformat import write, v4
E ModuleNotFoundError: No module named 'nbformat'
IPython/core/magics/basic.py:581: ModuleNotFoundError
______________________________________________________________________ TestMagicRunSimple.test_run_nb ______________________________________________________________________
self = <IPython.core.tests.test_run.TestMagicRunSimple testMethod=test_run_nb>
def test_run_nb(self):
"""Test %run notebook.ipynb"""
> from nbformat import v4, writes
E ModuleNotFoundError: No module named 'nbformat'
IPython/core/tests/test_run.py:391: ModuleNotFoundError
___________________________________________________________________ TestMagicRunSimple.test_run_nb_error ___________________________________________________________________
self = <IPython.core.tests.test_run.TestMagicRunSimple testMethod=test_run_nb_error>
def test_run_nb_error(self):
"""Test %run notebook.ipynb error"""
> from nbformat import v4, writes
E ModuleNotFoundError: No module named 'nbformat'
IPython/core/tests/test_run.py:407: ModuleNotFoundError
___________________________________________________________________________ test_code_from_file ____________________________________________________________________________
def test_code_from_file():
c = display.Code(filename=__file__)
> assert c._repr_html_().startswith('<style>')
IPython/lib/tests/test_display.py:266:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
IPython/lib/display.py:650: in _repr_html_
return style + highlight(self.data, self._get_lexer(), fmt)
IPython/lib/display.py:637: in _get_lexer
return get_lexer_for_filename(self.filename)
/usr/lib/python3.8/site-packages/pygments/lexers/__init__.py:207: in get_lexer_for_filename
res = find_lexer_class_for_filename(_fn, code)
/usr/lib/python3.8/site-packages/pygments/lexers/__init__.py:172: in find_lexer_class_for_filename
for cls in find_plugin_lexers():
/usr/lib/python3.8/site-packages/pygments/plugin.py:54: in find_plugin_lexers
yield entrypoint.load()
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2449: in load
self.require(*args, **kwargs)
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2472: in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pkg_resources.WorkingSet object at 0x7fd5d1508f40>
requirements = [Requirement.parse('backcall'), Requirement.parse('pygments'), Requirement.parse('prompt_toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0'), Requirement.parse('traitlets>=4.2'), Requirement.parse('pickleshare'), Requirement.parse('decorator'), ...]
env = <pkg_resources.Environment object at 0x7fd59ea3e820>, installer = None, replace_conflicting = False, extras = ()
def resolve(self, requirements, env=None, installer=None,
replace_conflicting=False, extras=None):
"""List all distributions needed to (recursively) meet `requirements`
`requirements` must be a sequence of ``Requirement`` objects. `env`,
if supplied, should be an ``Environment`` instance. If
not supplied, it defaults to all distributions available within any
entry or distribution in the working set. `installer`, if supplied,
will be invoked with each requirement that cannot be met by an
already-installed distribution; it should return a ``Distribution`` or
``None``.
Unless `replace_conflicting=True`, raises a VersionConflict exception
if
any requirements are found on the path that have the correct name but
the wrong version. Otherwise, if an `installer` is supplied it will be
invoked to obtain the correct version of the requirement and activate
it.
`extras` is a list of the extras to be used with these requirements.
This is important because extra requirements may look like `my_req;
extra = "my_extra"`, which would otherwise be interpreted as a purely
optional requirement. Instead, we want to be able to assert that these
requirements are truly required.
"""
# set up the stack
requirements = list(requirements)[::-1]
# set of processed requirements
processed = {}
# key -> dist
best = {}
to_activate = []
req_extras = _ReqExtras()
# Mapping of requirement to set of distributions that required it;
# useful for reporting info about conflicts.
required_by = collections.defaultdict(set)
while requirements:
# process dependencies breadth-first
req = requirements.pop(0)
if req in processed:
# Ignore cyclic or redundant dependencies
continue
if not req_extras.markers_pass(req, extras):
continue
dist = best.get(req.key)
if dist is None:
# Find the best distribution and add it to the map
dist = self.by_key.get(req.key)
if dist is None or (dist not in req and replace_conflicting):
ws = self
if env is None:
if dist is None:
env = Environment(self.entries)
else:
# Use an empty environment and workingset to avoid
# any further conflicts with the conflicting
# distribution
env = Environment([])
ws = WorkingSet([])
dist = best[req.key] = env.best_match(
req, ws, installer,
replace_conflicting=replace_conflicting
)
if dist is None:
requirers = required_by.get(req, None)
> raise DistributionNotFound(req, requirers)
E pkg_resources.DistributionNotFound: The 'matplotlib-inline' distribution was not found and is required by the application
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:787: DistributionNotFound
_____________________________________________________________________________ test_trust_help ______________________________________________________________________________
def test_trust_help():
> tt.help_all_output_test("trust")
IPython/terminal/tests/test_help.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
IPython/testing/tools.py:466: in help_all_output_test
nt.assert_equal(rc, 0, err)
/usr/lib64/python3.8/unittest/case.py:912: in assertEqual
assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nose.tools.trivial.Dummy testMethod=nop>, first = 1, second = 0
msg = "1 != 0 : [TerminalIPythonApp] WARNING | Subcommand `ipython trust` is deprecated and will be removed in future versio...0, in import_item\n module = __import__(package, fromlist=[obj])\nModuleNotFoundError: No module named 'nbformat'\n"
def _baseAssertEqual(self, first, second, msg=None):
"""The default assertEqual implementation, not type specific."""
if not first == second:
standardMsg = '%s != %s' % _common_shorten_repr(first, second)
msg = self._formatMessage(msg, standardMsg)
> raise self.failureException(msg)
E AssertionError: 1 != 0 : [TerminalIPythonApp] WARNING | Subcommand `ipython trust` is deprecated and will be removed in future versions.
E [TerminalIPythonApp] WARNING | You likely want to use `jupyter trust` in the future
E Traceback (most recent call last):
E File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
E return _run_code(code, main_globals, None,
E File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
E exec(code, run_globals)
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/__main__.py", line 14, in <module>
E start_ipython()
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/__init__.py", line 126, in start_ipython
E return launch_new_instance(argv=argv, **kwargs)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 844, in launch_instance
E app.initialize(argv)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
E return method(app, *args, **kwargs)
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/terminal/ipapp.py", line 307, in initialize
E super(TerminalIPythonApp, self).initialize(argv)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
E return method(app, *args, **kwargs)
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/application.py", line 450, in initialize
E self.parse_command_line(argv)
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/terminal/ipapp.py", line 302, in parse_command_line
E return super(TerminalIPythonApp, self).parse_command_line(argv)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
E return method(app, *args, **kwargs)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 684, in parse_command_line
E return self.initialize_subcommand(subc, subargv)
E File "/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/application.py", line 243, in initialize_subcommand
E return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
E return method(app, *args, **kwargs)
E File "/usr/lib/python3.8/site-packages/traitlets/config/application.py", line 588, in initialize_subcommand
E subapp = import_item(subapp)
E File "/usr/lib/python3.8/site-packages/traitlets/utils/importstring.py", line 30, in import_item
E module = __import__(package, fromlist=[obj])
E ModuleNotFoundError: No module named 'nbformat'
/usr/lib64/python3.8/unittest/case.py:905: AssertionError
============================================================================= warnings summary =============================================================================
IPython/core/inputsplitter.py:21
/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/inputsplitter.py:21: DeprecationWarning: IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`
warn('IPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`',
IPython/lib/tests/test_latextools.py:14
IPython/lib/tests/test_latextools.py:14: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_fails_when_no_cmd will be ignored
def test_latex_to_png_dvipng_fails_when_no_cmd():
IPython/lib/tests/test_latextools.py:32
IPython/lib/tests/test_latextools.py:32: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_runs will be ignored
@onlyif_cmds_exist('latex', 'dvipng')
IPython/lib/tests/test_latextools.py:48
IPython/lib/tests/test_latextools.py:48: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_latex_to_png_mpl_runs will be ignored
def test_latex_to_png_mpl_runs():
IPython/lib/tests/test_pretty.py:108
IPython/lib/tests/test_pretty.py:108: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_sets will be ignored
def test_sets():
IPython/utils/tests/test_capture.py:70
IPython/utils/tests/test_capture.py:70: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_empty will be ignored
def test_rich_output_empty():
IPython/utils/tests/test_capture.py:76
IPython/utils/tests/test_capture.py:76: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output will be ignored
def test_rich_output():
IPython/utils/tests/test_capture.py:87
IPython/utils/tests/test_capture.py:87: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_no_metadata will be ignored
def test_rich_output_no_metadata():
IPython/utils/tests/test_capture.py:94
IPython/utils/tests/test_capture.py:94: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_metadata will be ignored
def test_rich_output_metadata():
IPython/utils/tests/test_capture.py:102
IPython/utils/tests/test_capture.py:102: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_rich_output_display will be ignored
def test_rich_output_display():
IPython/utils/tests/test_capture.py:117
IPython/utils/tests/test_capture.py:117: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output will be ignored
def test_capture_output():
IPython/utils/tests/test_capture.py:127
IPython/utils/tests/test_capture.py:127: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_stdout will be ignored
def test_capture_output_no_stdout():
IPython/utils/tests/test_capture.py:138
IPython/utils/tests/test_capture.py:138: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_stderr will be ignored
def test_capture_output_no_stderr():
IPython/utils/tests/test_capture.py:150
IPython/utils/tests/test_capture.py:150: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_capture_output_no_display will be ignored
def test_capture_output_no_display():
IPython/utils/tests/test_pycolorize.py:50
IPython/utils/tests/test_pycolorize.py:50: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_loop_colors will be ignored
def test_loop_colors():
IPython/utils/tests/test_tokenutil.py:123
IPython/utils/tests/test_tokenutil.py:123: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_multiline_statement will be ignored
def test_multiline_statement():
IPython/core/tests/test_interactiveshell.py::test_run_cell_async
/usr/lib64/python3.8/asyncio/events.py:81: DeprecationWarning: `run_cell_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
self._context.run(self._callback, *self._args)
IPython/core/tests/test_interactiveshell.py::test_should_run_async
/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/tests/test_interactiveshell.py:1041: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
assert not ip.should_run_async("a = 5")
IPython/core/tests/test_interactiveshell.py::test_should_run_async
/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/tests/test_interactiveshell.py:1042: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
assert ip.should_run_async("await x")
IPython/core/tests/test_interactiveshell.py::test_should_run_async
/home/tkloczko/rpmbuild/BUILD/ipython-7.24.1/IPython/core/tests/test_interactiveshell.py:1043: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
assert ip.should_run_async("import asyncio; await asyncio.sleep(1)")
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================================================================== slowest 10 durations ===========================================================================
6.40s call ::project
6.38s call IPython/testing/plugin/__init__.py::project
3.45s call IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_autoreload
3.31s call IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_aimport
1.85s call IPython/core/tests/test_debugger.py::test_xmode_skip
1.62s call IPython/terminal/tests/test_embed.py::test_nest_embed
1.55s call IPython/utils/tests/test_io.py::test_io_init
1.47s call IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_attributes
1.43s call IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators
1.20s call IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_type
========================================================================= short test summary info ==========================================================================
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_set_matplotlib_close. This test requires ipykernel
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_set_matplotlib_formats. This test requires matplotlib
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_set_matplotlib_formats_kwargs. This test requires ipykernel
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_history. Test skipped due to test condition.
SKIPPED [1] IPython/core/tests/test_ultratb.py:450: Skipping test: testLogging. Test skipped due to test condition.
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_clipboard_get. Skipped under *nix when X11/XOrg not available
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_latex_to_html. This test requires matplotlib
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_latex_to_png_color. This test requires matplotlib
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_deliberately_broken. Test skipped due to test condition.
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_deliberately_broken2. Testing the skip decorator
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_linux. This test does not run under Linux
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_full_path_win32. This test only runs under Windows
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_get_home_dir_1. This test only runs under Windows
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_get_home_dir_2. This test only runs under Windows
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_get_home_dir_8. This test only runs under Windows
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_get_long_path_name_win32. This test only runs under Windows
SKIPPED [1] IPython/utils/tests/test_path.py:480: Skipping test: test_windows. This test only runs under Windows
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_find_cmd_pythonw. This test requires win32api to run
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:355: Skipping test: test_arg_split_win32. This test only runs under Windows
XFAIL IPython/lib/tests/test_latextools.py::test_latex_to_png_dvipng_fails_when_no_cmd
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_fails_when_no_cmd will be ignored
XFAIL IPython/lib/tests/test_latextools.py::test_latex_to_png_dvipng_runs
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_latex_to_png_dvipng_runs will be ignored
XFAIL IPython/lib/tests/test_latextools.py::test_latex_to_png_mpl_runs
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_latex_to_png_mpl_runs will be ignored
XFAIL IPython/lib/tests/test_pretty.py::test_sets
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_sets will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_rich_output_empty
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_rich_output_empty will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_rich_output
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_rich_output will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_rich_output_no_metadata
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_rich_output_no_metadata will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_rich_output_metadata
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_rich_output_metadata will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_rich_output_display
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_rich_output_display will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_capture_output
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_capture_output will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_capture_output_no_stdout
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_capture_output_no_stdout will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_capture_output_no_stderr
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_capture_output_no_stderr will be ignored
XFAIL IPython/utils/tests/test_capture.py::test_capture_output_no_display
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_capture_output_no_display will be ignored
XFAIL IPython/utils/tests/test_pycolorize.py::test_loop_colors
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_loop_colors will be ignored
XFAIL IPython/utils/tests/test_tokenutil.py::test_multiline_statement
reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_multiline_statement will be ignored
FAILED IPython/core/tests/test_magic.py::test_notebook_export_json - ModuleNotFoundError: No module named 'nbformat'
FAILED IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_nb - ModuleNotFoundError: No module named 'nbformat'
FAILED IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_nb_error - ModuleNotFoundError: No module named 'nbformat'
FAILED IPython/lib/tests/test_display.py::test_code_from_file - pkg_resources.DistributionNotFound: The 'matplotlib-inline' distribution was not found and is required by...
FAILED IPython/terminal/tests/test_help.py::test_trust_help - AssertionError: 1 != 0 : [TerminalIPythonApp] WARNING | Subcommand `ipython trust` is deprecated and will b...
=================================================== 5 failed, 797 passed, 19 skipped, 15 xfailed, 20 warnings in 58.25s ====================================================
Please ignore in above all bits related to missing matplot (will fill that gap shortly)
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
How to capture warnings — pytest documentation
If warnings are configured at the interpreter level, using the PYTHONWARNINGS environment variable or the -W command-line option, pytest will not configure any ......
Read more >Warning integration breaks warnings.filterwarnings #2430
The rationale for this is not that anyone uses nose anymore, but rather that nobody uses nose anymore - a reminder that after...
Read more >How to suppress py.test internal deprecation warnings
Context: I'm looking to evaluate the difficulty of porting a test suite from nose to pytest . The suite is fairly large and...
Read more >Release 7.24.1 The IPython Development Team
testing away from iptest and using pytest, as nose will not work on Python 3.10 and we will likely start removing it as....
Read more >How to Fix a PytestCollectionWarning about WebTest's ...
Here's a small warning I've come across a couple of times, and how to fix it with a niche pytest feature. If you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been actively working on this, and we need to patch ipykernel first that depends on some of IPython nose usage. I’m currently writing a small grant to Numfocus to hire someone to finish the heavy lifting.
I’m aware that we are still using yield test in pytest, and more concerning we are still relying on nose.
Unfortunately these days the maintainers are mostly I and MrMino, and we don’t have much time to work on it.
#12840 is a huge step forward but it needs to be ported to master, which is a non negligible amount of work.