GLOB sdist-make: /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/setup.py
py37 create: /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37
py37 installdeps: pytest-xdist, pytest-rerunfailures, pytest-mock
py37 inst: /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/.tmp/package/1/pytest-html-profiling-1.0.0.zip
py37 installed: apipkg==1.5,attrs==20.1.0,execnet==1.7.1,gprof2dot==2019.11.30,importlib-metadata==1.7.0,iniconfig==1.0.1,more-itertools==8.5.0,packaging==20.4,pluggy==0.13.1,py==1.9.0,pygraphviz==1.6,pyparsing==2.4.7,pytest==6.0.1,pytest-forked==1.3.0,pytest-html-profiling @ file:///tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/.tmp/package/1/pytest-html-profiling-1.0.0.zip,pytest-metadata==1.10.0,pytest-mock==3.3.1,pytest-rerunfailures==9.1,pytest-xdist==2.1.0,six==1.15.0,toml==0.10.1,zipp==3.1.0
py37 run-test-pre: PYTHONHASHSEED='3256612848'
py37 run-test: commands[0] | pytest -v -r a
============================= test session starts ==============================
platform linux -- Python 3.7.1, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/bin/python
cachedir: .tox/py37/.pytest_cache
metadata: {'Python': '3.7.1', 'Platform': 'Linux-4.15.0-1077-gcp-x86_64-with-debian-stretch-sid', 'Packages': {'pytest': '6.0.1', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'html-profiling': '1.0.0', 'metadata': '1.10.0', 'xdist': '2.1.0', 'mock': '3.3.1', 'rerunfailures': '9.1', 'forked': '1.3.0'}}
rootdir: /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0, configfile: tox.ini, testpaths: testing
plugins: html-profiling-1.0.0, metadata-1.10.0, xdist-2.1.0, mock-3.3.1, rerunfailures-9.1, forked-1.3.0
collecting ... collected 62 items
testing/test_pytest_html_profiling.py::TestHTML::test_durations PASSED [ 1%]
testing/test_pytest_html_profiling.py::TestHTML::test_pass PASSED [ 3%]
testing/test_pytest_html_profiling.py::TestHTML::test_skip PASSED [ 4%]
testing/test_pytest_html_profiling.py::TestHTML::test_fail PASSED [ 6%]
testing/test_pytest_html_profiling.py::TestHTML::test_rerun PASSED [ 8%]
testing/test_pytest_html_profiling.py::TestHTML::test_no_rerun PASSED [ 9%]
testing/test_pytest_html_profiling.py::TestHTML::test_conditional_xfails PASSED [ 11%]
testing/test_pytest_html_profiling.py::TestHTML::test_setup_error PASSED [ 12%]
testing/test_pytest_html_profiling.py::TestHTML::test_xfail PASSED [ 14%]
testing/test_pytest_html_profiling.py::TestHTML::test_xpass PASSED [ 16%]
testing/test_pytest_html_profiling.py::TestHTML::test_create_report_path PASSED [ 17%]
testing/test_pytest_html_profiling.py::TestHTML::test_report_title[] PASSED [ 19%]
testing/test_pytest_html_profiling.py::TestHTML::test_report_title[directory] PASSED [ 20%]
testing/test_pytest_html_profiling.py::TestHTML::test_report_title_addopts_env_var PASSED [ 22%]
testing/test_pytest_html_profiling.py::TestHTML::test_resources_inline_css PASSED [ 24%]
testing/test_pytest_html_profiling.py::TestHTML::test_resources PASSED [ 25%]
testing/test_pytest_html_profiling.py::TestHTML::test_stdout[pass] PASSED [ 27%]
testing/test_pytest_html_profiling.py::TestHTML::test_stdout[fail] PASSED [ 29%]
testing/test_pytest_html_profiling.py::TestHTML::test_custom_content_in_summary PASSED [ 30%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_html PASSED [ 32%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text[u'\x81'-woE=] PASSED [ 33%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text['foo'-Zm9v] PASSED [ 35%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text[b'\\xe2\\x80\\x93'-4oCT] PASSED [ 37%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_json PASSED [ 38%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_url PASSED [ 40%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image[image/png-png] PASSED [ 41%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image[image/png-image] PASSED [ 43%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image[image/jpeg-jpg] PASSED [ 45%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image[image/svg+xml-svg] PASSED [ 46%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_windows FAILED [ 48%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text_separated[u'\x81'] PASSED [ 50%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text_separated['foo'] PASSED [ 51%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_text_separated[b'\\xe2\\x80\\x93'] PASSED [ 53%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated[png-image] PASSED [ 54%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated[png-png] PASSED [ 56%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated[svg-svg] PASSED [ 58%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated[jpg-jpg] PASSED [ 59%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated_rerun[png-image] PASSED [ 61%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated_rerun[png-png] PASSED [ 62%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated_rerun[svg-svg] PASSED [ 64%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_separated_rerun[jpg-jpg] PASSED [ 66%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_non_b64[https://] PASSED [ 67%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_non_b64[file://] PASSED [ 69%]
testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_non_b64[image.png] PASSED [ 70%]
testing/test_pytest_html_profiling.py::TestHTML::test_very_long_test_name FAILED [ 72%]
testing/test_pytest_html_profiling.py::TestHTML::test_no_invalid_characters_in_filename PASSED [ 74%]
testing/test_pytest_html_profiling.py::TestHTML::test_no_environment PASSED [ 75%]
testing/test_pytest_html_profiling.py::TestHTML::test_environment PASSED [ 77%]
testing/test_pytest_html_profiling.py::TestHTML::test_environment_xdist PASSED [ 79%]
testing/test_pytest_html_profiling.py::TestHTML::test_environment_xdist_reruns PASSED [ 80%]
testing/test_pytest_html_profiling.py::TestHTML::test_environment_list_value PASSED [ 82%]
testing/test_pytest_html_profiling.py::TestHTML::test_environment_ordered PASSED [ 83%]
testing/test_pytest_html_profiling.py::TestHTML::test_xdist_crashing_slave PASSED [ 85%]
testing/test_pytest_html_profiling.py::TestHTML::test_utf8_surrogate PASSED [ 87%]
testing/test_pytest_html_profiling.py::TestHTML::test_ansi_color PASSED [ 88%]
testing/test_pytest_html_profiling.py::TestHTML::test_utf8_longrepr['foo'] PASSED [ 90%]
testing/test_pytest_html_profiling.py::TestHTML::test_utf8_longrepr[u'\x81'] PASSED [ 91%]
testing/test_pytest_html_profiling.py::TestHTML::test_collect_error PASSED [ 93%]
testing/test_pytest_html_profiling.py::TestHTML::test_css[colors0] PASSED [ 95%]
testing/test_pytest_html_profiling.py::TestHTML::test_css[colors1] PASSED [ 96%]
testing/test_pytest_html_profiling.py::TestHTML::test_css_invalid PASSED [ 98%]
testing/test_pytest_html_profiling.py::TestHTML::test_css_invalid_no_html PASSED [100%]
=================================== FAILURES ===================================
______________________ TestHTML.test_extra_image_windows _______________________
self =
mocker =
testdir =
def test_extra_image_windows(self, mocker, testdir):
> mock_isfile = mocker.patch("pytest_html.plugin.isfile")
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/testing/test_pytest_html_profiling.py:445:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pytest_mock/plugin.py:341: in __call__
**kwargs
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pytest_mock/plugin.py:182: in _start_patch
mocked = p.start() # type: unittest.mock.MagicMock
/opt/python/3.7.1/lib/python3.7/unittest/mock.py:1386: in start
result = self.__enter__()
/opt/python/3.7.1/lib/python3.7/unittest/mock.py:1239: in __enter__
self.target = self.getter()
/opt/python/3.7.1/lib/python3.7/unittest/mock.py:1409: in
getter = lambda: _importer(target)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
target = 'pytest_html.plugin'
def _importer(target):
components = target.split('.')
import_path = components.pop(0)
> thing = __import__(import_path)
E ModuleNotFoundError: No module named 'pytest_html'
/opt/python/3.7.1/lib/python3.7/unittest/mock.py:1092: ModuleNotFoundError
______________________ TestHTML.test_very_long_test_name _______________________
self =
testdir =
def test_very_long_test_name(self, testdir):
testdir.makeconftest(
"""
import pytest
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
if report.when == 'call':
from pytest_html import extras
report.extra = [extras.image('image.png')]
"""
)
# This will get truncated
test_name = "test_{}".format("a" * 300)
testdir.makepyfile(
"""
def {0}():
assert False
""".format(
test_name
)
)
result, html = run(testdir)
file_name = "test_very_long_test_name.py__{}_0_0.png".format(test_name)[-255:]
src = "assets/" + file_name
link = ''.format(src)
assert result.ret
> assert link in html
E assert '' in '\n\n \n \n Test Report\n \n No results found. Try to check the filters | '
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/testing/test_pytest_html_profiling.py:595: AssertionError
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.7.1, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /tmp/pytest-of-travis/pytest-24/test_very_long_test_name0
plugins: html-profiling-1.0.0, metadata-1.10.0, xdist-2.1.0, mock-3.3.1, rerunfailures-9.1, forked-1.3.0
collected 1 item
test_very_long_test_name.py
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/main.py", line 240, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/main.py", line 296, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 337, in traced_hookexec
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
INTERNALERROR> result = func()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 335, in
INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/main.py", line 321, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 337, in traced_hookexec
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
INTERNALERROR> result = func()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 335, in
INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/runner.py", line 100, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/runner.py", line 117, in runtestprotocol
INTERNALERROR> reports.append(call_and_report(item, "call", log))
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/_pytest/runner.py", line 209, in call_and_report
INTERNALERROR> report = hook.pytest_runtest_makereport(item=item, call=call) # type: TestReport
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 337, in traced_hookexec
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
INTERNALERROR> result = func()
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 335, in
INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs))
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/tmp/pytest-of-travis/pytest-24/test_very_long_test_name0/conftest.py", line 7, in pytest_runtest_makereport
INTERNALERROR> from pytest_html import extras
INTERNALERROR> ModuleNotFoundError: No module named 'pytest_html'
============================ no tests ran in 0.12s =============================
=============================== warnings summary ===============================
testing/test_pytest_html_profiling.py::TestHTML::test_css[colors0]
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pytest_html_profiling/plugin.py:85: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-travis/pytest-24/test_css0/red.css' mode='r' encoding='UTF-8'>
open(csspath)
testing/test_pytest_html_profiling.py::TestHTML::test_css[colors1]
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pytest_html_profiling/plugin.py:85: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-travis/pytest-24/test_css1/green.css' mode='r' encoding='UTF-8'>
open(csspath)
testing/test_pytest_html_profiling.py::TestHTML::test_css[colors1]
/tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/lib/python3.7/site-packages/pytest_html_profiling/plugin.py:85: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/pytest-of-travis/pytest-24/test_css1/blue.css' mode='r' encoding='UTF-8'>
open(csspath)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED testing/test_pytest_html_profiling.py::TestHTML::test_extra_image_windows
FAILED testing/test_pytest_html_profiling.py::TestHTML::test_very_long_test_name
================== 2 failed, 60 passed, 3 warnings in 47.49s ===================
ERROR: InvocationError for command /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/.tox/py37/bin/pytest -v -r a (exited with code 1)
___________________________________ summary ____________________________________
ERROR: py37: commands failed
write json report at: /tmp/tmpc5u3en0o/pytest-html-profiling-1.0.0/result.json
Time: 124.5 seconds