Commit Graph

65 Commits

Author SHA1 Message Date
Gleb Nikonorov d47c7cbff3 split plugin.py into smaller files (#427) 2021-05-10 10:21:59 +02:00
Jim Brännlund a0a5916bd7
Handle flaky windows test by rerunning (#414) 2020-12-14 00:02:47 +01:00
Jim Brännlund bbcc0f214f
Bump Black and Flake8 deps (#416)
Co-authored-by: Gleb Nikonorov <gleb.i.nikonorov@gmail.com>
2020-12-13 23:52:19 +01:00
Gleb Nikonorov e26097224a
Make the report tab title reflect the report name (#420)
* Make the report tab title reflect the report name

* refactor test_report_title test
2020-12-13 17:21:54 -05:00
Prakhar Gurunani 8b7bdc1fc5
Better error on missing CSS files. (#390)
Co-authored-by: Gleb Nikonorov <gleb.i.nikonorov@gmail.com>
2020-12-09 16:25:14 +01:00
Gleb Nikonorov 2bb20108c6
Stop attaching test reruns to final test report entries (#387)
* treat rerun entries as seperate test runs

* Add changelog entry

* fix a typo

* remove debug code

* fix flaky test on mac
2020-11-30 21:40:18 -05:00
Gleb Nikonorov b57ca0bcf2
Allow for report duration formatting (#380)
* first attempt at a working solution

* final solution, no tests

* Update README.rst

Add documentation on how to provide a custom display value for duration formatters

* temp

* finalize the change

* undo test report changes

* fixup tests

* Clarify default duration column data formatting

* fix failing tests

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
2020-11-27 12:10:43 +00:00
Gleb Nikonorov d971d0065d
Respect --show-capture=no flag (#359) 2020-10-29 15:57:27 +00:00
Charles Machalow b9bb5a9b4d
Enable testing on Windows and MacOS (#357)
Co-authored-by: Gleb Nikonorov <gleb.i.nikonorov@gmail.com>
2020-10-24 14:52:57 +01:00
Gleb Nikonorov b609a1d914
Respect pytest --capture=no and -s flags (#353) 2020-10-23 14:44:31 +01:00
Charles Machalow f2d41db105
Post process html to include teardown in log (#271) 2020-09-18 09:51:15 +01:00
Gleb Nikonorov c5a82636be
Sync .pre-commit-config.yaml with pytest (#335) 2020-09-17 08:41:10 +01:00
Sorin Sbarnea cbfc38d4c7
Consolidate tox environments (#328) 2020-08-11 13:54:34 +01:00
Sorin Sbarnea 955eb440cc
Merge branch 'master' into fix-ansi-in-report 2020-08-10 13:16:46 +01:00
Michał Bielawski 4556076800
Make the maximum asset filename length configurable. (#313)
* Make the maximum asset filename length configurable.
2020-07-27 14:16:00 +02:00
Jim Brännlund 3a4efa1d18 Strip ANSI escape sequences when ansi2html is missing
Fixes: #314
2020-07-16 19:15:44 +02:00
Zac-HD 97f275f47d Rename for xdist compatibility
Fixes #305
2020-06-14 18:10:35 +10:00
Dan Halperin 9e06ccb376 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.
2020-05-14 13:52:54 -07:00
Jim Brännlund fe7b622cc0
Merge branch 'master' into fix-missing-image 2020-05-14 20:51:55 +02:00
Jim Brännlund 599693b729 Better fix for TerminalReporter issue 2020-05-14 13:38:52 +02:00
Christian Sandberg fea4eb3f3d Fix image missing when using Base64 content 2020-03-21 19:39:32 +01:00
Christian Sandberg 27be3f5d29 Temporary hack to solve test failures 2020-03-18 19:32:04 +01:00
Christian Sandberg 145c746a07 Add extra fixture 2020-02-29 19:50:21 +01:00
werdeil 966228c3ea Add hook to change report main title 2020-02-28 13:41:01 +01:00
Jim Brännlund 301d52f150 Fix collapsable bug 2020-02-20 12:12:12 -05:00
Jim Brännlund ac30b65c34 Control render using configuration 2020-02-15 02:46:49 +01:00
Maxime Jacob e63d5ca02b Remove forgotten debug output that was poluting the test outputs. 2020-02-05 19:20:05 -05:00
Maxime Jacob d6bc3ab6cf Added an extra test to cover the case where a href would be contained in the dictionary.
Dictionary string generation now uses json.dumps instead of the handmade json.dumps.
2020-02-05 18:09:18 -05:00
Maxime Jacob 753ca944ea Merge branch 'master' of https://github.com/pytest-dev/pytest-html 2020-02-05 17:15:36 -05:00
Maxime Jacob 27b9051970 Added support for ordering metadata dictionaries by key. This compare requires casting the keys to string, as
far as I know.
2020-02-04 20:03:23 -05:00
Maxime Jacob f03b9d9a4b Added the CSS specification for the video class. It is pretty much a duplicate of the image css.
Code for the video extra has been extracted to a function to clean up a bit the if/elif/elif that is starting to
get pretty big. Maybe the other conditions could be extracted to their own method to clean up a bit. Once again,
there seems to be a lot of code duplication with image, so we may want to refactor images, videos, and audio as
a media type and have some kind of template method.

Basic unit tests were added to make sure that the extra was correctly added to the report when the extra was
requested.
2020-02-01 21:01:19 -05:00
Jim Brännlund 97267a2523 Release v2.0.1 2019-11-05 14:15:06 -08:00
Andy.Yang 3d5e3340aa
Merge branch 'master' into master 2019-11-05 14:48:52 +08:00
Andy.Yang 618af9e072
Support utf8 display 2019-11-05 13:44:08 +08:00
Krzysztof Pawlik 7166364ad4 Close opened resource. (#235)
* Close opened resource.

* Update pytest_html/plugin.py

Co-Authored-By: Bruno Rocha <rochacbruno@users.noreply.github.com>

* Use `f""` instead of `.format()` call.

* Add validation for raised warnings to tests.
2019-11-03 04:58:59 +01:00
Hugo van Kemenade e6e5ef2585 Drop support for legacy Python 2.7 (#230)
* Drop support for legacy Python 2.7

* Upgrade Python syntax with pyupgrade --py36-plus

* Require pytest 5+, supports only Python 3

* Format with Black
2019-09-09 10:10:07 +02:00
Jim Brännlund 9dd249f200
Fix assets file naming to work across both *nix and windows (#223)
* Fix assets file naming to work across both *nix and windows

Fixes #214
Fixes #213

* Better replacement strategy for test id

* Update markers
2019-08-06 13:57:05 +02:00
Jim Brännlund 6abbbff3e4
Remove unused and undocumented markers (#224) 2019-08-05 18:34:11 +02:00
Jim Brännlund 8e96c6ed94
Migrate to 'black' for consistent styling and formatting (#218)
* Migrate to 'black' for consistent styling and formatting

* Add black to tox and travis
2019-08-04 14:09:46 +02:00
Michał Bielawski 623efc6198 Truncate long test names in assets. 2019-06-19 15:40:12 +01:00
Jim Brännlund 582c29fb5a Handle when report title is stored as an environment variable
When the --html flag is used in pytest.ini with "addopts" and the
report title is stored in an environment variable, the name of the
environment variable was used as the report title.

In other words, the environment variable was never expanded.

Fixes: #201
2019-04-26 11:08:20 +02:00
Iulia Liakh 27b6e77ab1 Change assets naming method (#199)
* added assets name hashing option

* from command line option to config option

* new naming strategy

* fix

* Flake8 issues fixed

* more Flake8 issues fixed
2019-02-19 06:34:01 -03:00
Ana Ribeiro 6f9b14c7eb Fixed tests that were failing due Pytest updates (#190)
* Corrected Rerun failures - from 4ec74311cd (diff-c3a581865b7c0be4e6b5d5fa60d6aed5)

* Removed ENV

* Changed funcarg to pytest fixture

* Removed some comments

* Style matter

* Style

* Reversed rerunfailures to 4.1

* Style

* added comment about issue 77

* Removed rerunfailures version due launch of rerunfailures 6.0
2019-01-11 10:00:33 +00:00
Anthony Sottile 79e1d7d53f Fix invalid escape sequences 2018-06-30 08:41:17 -07:00
Jace Browning fb6a456415 Disable sort on environment table when metadata is ordered 2018-05-22 11:31:53 +01:00
Dave Hunt 51c77d5c3f
Finish up the custom CSS support including docs and tests 2018-04-05 13:29:13 +01:00
Dave Hunt ebebda43dd
Report collection errors in HTML report. (#154)
Fixes #148
2018-04-05 11:31:56 +01:00
Joep Schuurkes d5031769b6 Add hook for modifying summary section (#152)
Closes #109
2018-04-05 11:31:20 +01:00
Joep Schuurkes abf8f15e4e adds filename of report as title to html body 2018-03-26 16:22:57 +01:00
Jeffry Pincus c61dc5bbe0 Fix for including a screenshot bug on Windows (#136)
Fixes #124
2018-01-04 12:48:33 +00:00