Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, message=None, type_=None):
super(Result, self).__init__(self._tag)
if message:
self.message = message
if type:
self.type = type_
def __eq__(self, other):
return (
self._tag == other._tag
and self.type == other.type
and self.message == other.message
)
class Skipped(Result):
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):
return (
self._tag == other._tag
and self.type == other.type
and self.message == other.message
)
class Skipped(Result):
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):
"""Test result when the case has errors during execution."""
_tag = "error"
def __eq__(self, other):
return super(Error, self).__eq__(other)
POSSIBLE_RESULTS = {Failure, Error, Skipped}
return (
self._tag == other._tag
and self.type == other.type
and self.message == other.message
)
class Skipped(Result):
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):
"""Test result when the case has errors during execution."""
_tag = "error"
def __eq__(self, other):
return super(Error, self).__eq__(other)
POSSIBLE_RESULTS = {Failure, Error, Skipped}
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):
"""Test result when the case has errors during execution."""
_tag = "error"
def __eq__(self, other):
return super(Error, self).__eq__(other)
POSSIBLE_RESULTS = {Failure, Error, Skipped}
class TestCase(Element):
"""Object to store a testcase and its result.
Attributes:
name: case name
classname: the parent class of the case
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):
"""Test result when the case has errors during execution."""
_tag = "error"
def __eq__(self, other):
return super(Error, self).__eq__(other)
POSSIBLE_RESULTS = {Failure, Error, Skipped}
class TestCase(Element, PropertiesFunc):
"""Object to store a testcase and its result.
Attributes:
name: case name
classname: the parent class of the case
def __init__(self, message=None, type_=None):
super(Result, self).__init__(self._tag)
if message:
self.message = message
if type_:
self.type = type_
def __init__(self, message=None, type_=None):
super(Result, self).__init__(self._tag)
if message:
self.message = message
if type:
self.type = type_
def __init__(self, message=None, type_=None):
super(Result, self).__init__(self._tag)
if message:
self.message = message
if type_:
self.type = type_
def __eq__(self, other):
return (
self._tag == other._tag
and self.type == other.type
and self.message == other.message
)
class Skipped(Result):
"""Test result when the case is skipped."""
_tag = "skipped"
def __eq__(self, other):
return super(Skipped, self).__eq__(other)
class Failure(Result):
"""Test result when the case failed."""
_tag = "failure"
def __eq__(self, other):
return super(Failure, self).__eq__(other)
class Error(Result):