boolean (AbstractPythonLegacyTestRunConfiguration cfg) { if (cfg == null) return false; if (getTestType() != cfg.getTestType()) return false; return switch (getTestType()) { case TEST_FOLDER -> getFolderName().equals(cfg.getFolderName()); case TEST_SCRIPT -> getScriptName().equals(cfg.getScriptName()) && getWorkingDirectory().equals(cfg.getWorkingDirectory()); case TEST_CLASS -> getScriptName().equals(cfg.getScriptName()) && getWorkingDirectory().equals(cfg.getWorkingDirectory()) && getClassName().equals(cfg.getClassName()); case TEST_METHOD -> getScriptName().equals(cfg.getScriptName()) && getWorkingDirectory().equals(cfg.getWorkingDirectory()) && getClassName().equals(cfg.getClassName()) && getMethodName().equals(cfg.getMethodName()); case TEST_FUNCTION -> getScriptName().equals(cfg.getScriptName()) && getWorkingDirectory().equals(cfg.getWorkingDirectory()) && getMethodName().equals(cfg.getMethodName()); }; }