909e42d414
Summary: A simplified end-to-end implementation POD interface set-up, still have bugs with HDDkeys Version bug fix and first iterator implementation Fixed out-of-scope reference in PVS iterator Added PVS unit tests Reviewers: buda, mferencevic, dgleich, teon.banek Reviewed By: buda, dgleich Subscribers: mferencevic, pullbot Differential Revision: https://phabricator.memgraph.io/D1369
40 lines
880 B
Python
40 lines
880 B
Python
class TestResults:
|
|
|
|
"""
|
|
Class used to store test results. It has parameters total
|
|
and passed.
|
|
|
|
@attribute total:
|
|
int, total number of scenarios.
|
|
@attribute passed:
|
|
int, number of passed scenarios.
|
|
"""
|
|
|
|
def __init__(self):
|
|
self.total = 0
|
|
self.passed = 0
|
|
|
|
def num_passed(self):
|
|
"""
|
|
Getter for param passed.
|
|
"""
|
|
return self.passed
|
|
|
|
def num_total(self):
|
|
"""
|
|
Getter for param total.
|
|
"""
|
|
return self.total
|
|
|
|
def add_test(self, status):
|
|
"""
|
|
Method adds one scenario to current results. If
|
|
scenario passed, number of passed scenarios increases.
|
|
|
|
@param status:
|
|
string in behave 1.2.5, 'passed' if scenario passed
|
|
"""
|
|
if status == "passed":
|
|
self.passed += 1
|
|
self.total += 1
|