Add check for input type
@@ -67,6 +67,10 @@ class CorrectedTestStatistics(object):
:type corrected_test_statistics: SimpleTestStatistics or EarlyStoppingTestStatistics
"""
def __init__(self, original_test_statistics, corrected_test_statistics):
+ if not isinstance(original_test_statistics, BaseTestStatistics):
+ raise RuntimeError("original_test_statistics should be instance of BaseTestStatistics or its subclass")
+ if not isinstance(corrected_test_statistics, BaseTestStatistics):
+ raise RuntimeError("corrected_test_statistics should be instance of BaseTestStatistics or its subclass")
type1 = type(original_test_statistics)
type2 = type(corrected_test_statistics)
if type1 != type2:
