From d2b053949743a99851985780dbfbe26c514251f4 Mon Sep 17 00:00:00 2001 From: IanCa Date: Mon, 8 Jan 2024 13:48:24 -0600 Subject: [PATCH] Show directory name for datasets in spec_tests --- spec_tests/validate_bids.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec_tests/validate_bids.py b/spec_tests/validate_bids.py index 7cb02d4e..0ee85293 100644 --- a/spec_tests/validate_bids.py +++ b/spec_tests/validate_bids.py @@ -26,9 +26,9 @@ def test_validation(self): bids_data = BidsDataset(dataset_path) issues = bids_data.validate(check_for_warnings=False) if issues: - self.fail_count.append(issues) + self.fail_count.append((directory, issues)) print(f"{len(self.fail_count)} tests got an unexpected result") - print("\n".join(get_printable_issue_string(issue, skip_filename=False) for issue in self.fail_count)) + print("\n".join(get_printable_issue_string(issue, f"Errors in directory: {title}", skip_filename=False) for title, issue in self.fail_count)) self.assertEqual(0, len(self.fail_count)) if __name__ == '__main__':