From 9e06ccb37625249fbd599c3de65c267fdfbf2637 Mon Sep 17 00:00:00 2001 From: Dan Halperin Date: Tue, 12 May 2020 16:43:57 -0700 Subject: [PATCH] Improve testing for images in html This is for pytest-dev/pytest-selenium#237. My original change was redundant with pytest-dev/pytest-html#277, so just update tests and acknowledgements for the author of #277, the author of #287, and the reporters of #265 and pytest-dev/pytest-selenium#237. --- CHANGES.rst | 6 ++++++ testing/test_pytest_html.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5026bea4..b2b2cc63 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Release Notes ------------- +**2.1.2 (unreleased)** + +* Fix issue with missing image or video in extras. (`#265 `_ and `pytest-selenium#237 `_) + + * Thanks to `@p00j4 `_ and `@anothermattbrown `_ for reporting and `@christiansandberg `_ and `@superdodd `_ and `@dhalperi `_ for the fix + **2.1.1 (2020-03-18)** * Fix issue with funcargs causing failures. (`#282 `_) diff --git a/testing/test_pytest_html.py b/testing/test_pytest_html.py index 00f8c7a8..c15ce0be 100644 --- a/testing/test_pytest_html.py +++ b/testing/test_pytest_html.py @@ -591,8 +591,10 @@ def {test_name}(): file_name = f"test_very_long_test_name.py__{test_name}_0_0.png"[-255:] src = "assets/" + file_name link = f'' + img = f'' assert result.ret assert link in html + assert img in html assert os.path.exists(src) def test_extra_fixture(self, testdir):