Skip to content

Function to add TestCase disabled info #79

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions junit_xml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ def add_skipped_info(self, message=None, output=None):
if output:
self.skipped[0]["output"] = output

def add_disabled_info(self, message=None, output=None):
self.is_enabled = False
self.add_skipped_info(message, output)

def is_failure(self):
"""returns true if this test case is a failure"""
return sum(1 for f in self.failures if f["message"] or f["output"]) > 0
Expand Down