def test_ephysMissingError(self): path = Path(dir_path) / "dataset" / "exp-ephysMissingError" self.assertEqual(CHK.is_valid(path)[0], False)
def test_nonAuthorizedFolderError(self): path = Path(dir_path) / "dataset" / "exp-nonAuthorizedFolderError" self.assertEqual(CHK.is_valid(path)[0], False)
def test_noSubjectsFolder(self): path = Path(dir_path) / "dataset" / "exp-noSubjects" self.assertEqual(CHK.is_valid(path)[0], False)
def test_sessionError(self): path = Path(dir_path) / "dataset" / "exp-sessionError" self.assertEqual(CHK.is_valid(path)[0], False)
def test_datasetDescriptionsMissingError(self): path = Path(dir_path) / "dataset" / "exp-datasetDescriptionsMissingError" self.assertEqual(CHK.is_valid(path)[0], False) self.assertEqual(len(CHK.is_valid(path)[1]),1)
def test_participantMissingError(self): path = Path(dir_path) / "dataset" / "exp-participantsMissingError" self.assertEqual(CHK.is_valid(path)[0], False) self.assertEqual(len(CHK.is_valid(path)[1]), 1)
def test_invalid_character(self): path = Path(dir_path) / "dataset" / "exp-invalid_character" self.assertEqual(CHK.is_valid(path)[0], False)
def test_current_dir_input(self): self.switch_dir(self.valid_dir) path = Path('.') self.assertEqual(CHK.is_valid(path)[0], True)
def test_valid_full_metadata(self): path = Path(dir_path) / "dataset" / "exp-valid_full_metadata" self.assertEqual(CHK.is_valid(path)[0], True)
def test_invalid_folder(self): path = Path(dir_path) / "dataset" / "non-existent-folder" self.assertEqual(CHK.is_valid(path)[0], False)
def test_validMultipleSession(self): path = Path(dir_path) / "dataset" / "exp-validMultipleSession" self.assertEqual(CHK.is_valid(path)[0], True)
def test_wrong_dir_trailing_slash(self): path = Path('./') self.assertEqual(CHK.is_valid(path)[0], False)
def test_lower_input_dir(self): self.switch_dir(self.valid_dir / "sub-enya") path = Path('..') self.assertEqual(CHK.is_valid(path)[0], True)
def test_nonAuthorizedDataFilesError(self): path = Path(dir_path) / "dataset" / "exp-nonAuthorizedDataFilesError" self.assertEqual(CHK.is_valid(path)[0], False) self.assertEqual(len(CHK.is_valid(path)[1]), 1)
def test_experimentError(self): path = Path(dir_path) / "dataset" / "experimentError" self.assertEqual(CHK.is_valid(path)[0], False)
def test_missingDataFile(self): path = Path(dir_path) / "dataset" / "exp-missingDataFile" self.assertEqual(CHK.is_valid(path)[0], False) self.assertEqual(len(CHK.is_valid(path)[1]),1)
def test_multipleError(self): path = Path(dir_path) / "dataset" / "exp-MultipleError" self.assertEqual(CHK.is_valid(path)[0], False) self.assertEqual(len(CHK.is_valid(path)[1]), 3) # check if there is 3 error reported