From 82022ef92993e7ee33c02b7ffa543745416164cf Mon Sep 17 00:00:00 2001 From: Tom Selier Date: Sat, 21 Oct 2023 19:44:05 +0200 Subject: [PATCH] fixed unrunnable suite without scaler --- src/suite.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/suite.py b/src/suite.py index 5afefd6..c6f0939 100644 --- a/src/suite.py +++ b/src/suite.py @@ -36,7 +36,7 @@ from helpers.tags import Tree # Tests from helpers.test.knn import CVSuiteTestKNN -# from helpers.test.decision_tree import CVSuiteTestDecisionTree +from helpers.test.decision_tree import CVSuiteTestDecisionTree ## UI config load PROJECT_PATH = pathlib.Path(__file__).parent @@ -308,6 +308,10 @@ class CVSuite: self.log.add(f"Std {label}", std[idx]) def runTest(self, data, event=None): + # Don't run the test if there's no scaler + if self.scaler is None: + return + output = self.builder.get_object("testdata") output.configure(state="normal") output.delete(1.0, "end")