diff --git a/spec_tests/hed-examples b/spec_tests/hed-examples index ffdcc759..5e9f9eba 160000 --- a/spec_tests/hed-examples +++ b/spec_tests/hed-examples @@ -1 +1 @@ -Subproject commit ffdcc759aa8256ede7bcfb0caa57914faa88e738 +Subproject commit 5e9f9eba404e0b23f0818f5adf1056fbdf60269c diff --git a/tests/schema/test_hed_schema_io_df.py b/tests/schema/test_hed_schema_io_df.py index bf59dbc1..d8d37059 100644 --- a/tests/schema/test_hed_schema_io_df.py +++ b/tests/schema/test_hed_schema_io_df.py @@ -24,7 +24,7 @@ def test_saving_default_schemas(self): reloaded_schema = load_schema(self.output_folder + "test_8.tsv") self.assertEqual(schema, reloaded_schema) - schema = load_schema_version("score_1.1.1") + schema = load_schema_version("score_1.1.0") schema.save_as_dataframes(self.output_folder + "test_score.tsv", save_merged=True) reloaded_schema = load_schema(self.output_folder + "test_score.tsv") diff --git a/tests/scripts/test_script_util.py b/tests/scripts/test_script_util.py index f87feccc..55989be1 100644 --- a/tests/scripts/test_script_util.py +++ b/tests/scripts/test_script_util.py @@ -31,6 +31,38 @@ def test_none_extension(self): class TestSortBaseSchemas(unittest.TestCase): + TEST_DIR = 'test_directory' + + @classmethod + def setUpClass(cls): + if not os.path.exists(cls.TEST_DIR): + os.makedirs(cls.TEST_DIR) + os.chdir(cls.TEST_DIR) + cls.create_stub_files() + + @classmethod + def tearDownClass(cls): + os.chdir('..') + shutil.rmtree(cls.TEST_DIR) + + @classmethod + def create_stub_files(cls): + filenames = [ + "test_schema.mediawiki", + os.path.normpath("hedtsv/test_schema/test_schema_Tag.tsv"), + "other_schema.xml", + os.path.normpath("hedtsv/wrong_folder/wrong_name_Tag.tsv"), + os.path.normpath("prerelease/hedtsv/test_schema/test_schema_Tag.tsv"), + os.path.normpath("not_hedtsv/test_schema/test_schema_Tag.tsv") + ] + for filename in filenames: + filepath = os.path.normpath(filename) + directory = os.path.dirname(filepath) + if directory: + os.makedirs(directory, exist_ok=True) + with open(filepath, 'w') as f: + f.write('') # Create an empty file + def test_mixed_file_types(self): filenames = [ "test_schema.mediawiki",