Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
behave-html-pretty-formatter 1.14.2
===================================
Respect encoding inherited from behave.
Fixing behave to version 1.2.6 before we can fix issues.


behave-html-pretty-formatter 1.14.1
===================================
Hotfix - font off-center, switching sans-serif to the front.
Expand Down
8 changes: 7 additions & 1 deletion behave_html_pretty_formatter/html_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,8 +1731,14 @@ def close(self):

# Generate the head of the html page.
with document.head:
# Respect encoding inherited from behave.
behave_encoding = self.stream_opener.encoding

# Set content and http-equiv - taken from the base html formatter.
meta(content="text/html;charset=utf-8", http_equiv="content-type")
meta(
content=f"text/html;charset={behave_encoding}",
http_equiv="content-type",
)

# Load and insert css theme.
css_fname = "behave.css" if self.pretty_output else "behave.min.css"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "behave-html-pretty-formatter"
version = "1.14.1"
version = "1.14.2"
description = "Pretty HTML Formatter for Behave"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down Expand Up @@ -42,7 +42,7 @@ keywords = [
]
requires-python = ">=3.6"
dependencies = [
"behave",
"behave==1.2.6",
"dominate==2.9.0",
"markdown",
]
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/help-screen.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: List HTML formatter among the available formatters
Then it should pass
And the command output should contain:
"""
AVAILABLE FORMATTERS:
Available formatters:
html-pretty Pretty HTML Formatter
json JSON dump of test run
"""
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ envlist =
[testenv]
description = Tests
deps =
behave[toml]@git+http://github.com/behave/behave.git@v1.2.7.dev5
behave==1.2.6
PyHamcrest
commands =
behave {posargs}
behave {posargs: tests/acceptance/}

[testenv:black]
description = Ensure consistent code style
Expand Down
Loading