Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set the class name as the default test name in junit xml output #7

Merged
merged 2 commits into from
Jul 28, 2023
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
2 changes: 1 addition & 1 deletion Dockerfile.github_flow
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18

ARG LIBDLT_VERSION=v2.18.8

Expand Down
2 changes: 1 addition & 1 deletion src/dltlyse/core/plugin_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def add_result(self, **kwargs):
plugin_docstring = inspect.getdoc(self)

# Parse plugin short description
kwargs.setdefault("testname", plugin_docstring.splitlines()[0] if plugin_docstring else "")
kwargs.setdefault("testname", plugin_docstring.splitlines()[0] if plugin_docstring else type(self).__name__)

# Parse plugin metadata and add plugin docstring
metadata = copy.deepcopy(getattr(self, "plugin_metadata", {}))
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_plugin_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_plugin_add_result_no_metadata(): # pylint: disable=invalid-name

result = results[0]
assert result.classname == "TestNoMetadataPlugin"
assert result.testname == ""
assert result.testname == "TestNoMetadataPlugin"
assert result.state == "success"
assert result.message == "Test successfully"
assert result.metadata.metadata == {"docstring": ""}
Expand Down