Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and BeyondEvil committed Jul 15, 2022
1 parent c5b9cab commit 11a368d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions testing/test_pytest_html.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#import builtins
# import builtins
import json
import os
import random
Expand All @@ -28,12 +28,12 @@
# builtins.open = _open


def remove_deprecation_from_recwarn(recwarn):
# TODO: Temporary hack until they fix
# https://github.com/pytest-dev/pytest/issues/6936
return [
item for item in recwarn if "TerminalReporter.writer" not in repr(item.message)
]
# def remove_deprecation_from_recwarn(recwarn):
# # TODO: Temporary hack until they fix
# # https://github.com/pytest-dev/pytest/issues/6936
# return [
# item for item in recwarn if "TerminalReporter.writer" not in repr(item.message)
# ]


def run(testdir, path="report.html", *args):
Expand Down Expand Up @@ -1021,8 +1021,8 @@ def test_css(self, testdir, recwarn, colors):
cssargs.extend(["--css", path])
result, html = run(testdir, "report.html", "--self-contained-html", *cssargs)
assert result.ret == 0
warnings = remove_deprecation_from_recwarn(recwarn)
assert len(warnings) == 0
# warnings = remove_deprecation_from_recwarn(recwarn)
# assert len(warnings) == 0
for k, v in css.items():
assert str(v["path"]) in html
assert v["style"] in html
Expand Down

0 comments on commit 11a368d

Please sign in to comment.