Skip to content

Commit

Permalink
Merge pull request #674 from VisLab/develop
Browse files Browse the repository at this point in the history
Develop updated cache directory tests setup
  • Loading branch information
VisLab committed Jun 1, 2023
2 parents 83c61a5 + d4e1290 commit c68ddd8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Binary file added tests/data/model_tests/ExcelMultipleSheets.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/models/test_spreadsheet_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io

from hed.errors import HedFileError
from hed.models import TabularInput, SpreadsheetInput, model_constants, Sidecar
from hed.models import TabularInput, SpreadsheetInput, Sidecar
import shutil
from hed import schema
import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions tests/models/test_tabular_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ def test_validate_file_warnings(self):
issues2a = input_file2.validate(hed_schema=self.hed_schema, error_handler=ErrorHandler(False))
breakHere = 3


if __name__ == '__main__':
unittest.main()
5 changes: 4 additions & 1 deletion tests/schema/test_hed_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def test_find_hed_expression(self):
class TestLocal(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.hed_cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../schema_cache_test_local/')
hed_cache_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../schema_cache_test_local/')
if os.path.exists(hed_cache_dir) and os.path.isdir(hed_cache_dir):
shutil.rmtree(hed_cache_dir)
cls.hed_cache_dir = hed_cache_dir
cls.saved_cache_folder = hed_cache.HED_CACHE_DIRECTORY
schema.set_cache_directory(cls.hed_cache_dir)

Expand Down
3 changes: 1 addition & 2 deletions tests/validator/test_spreadsheet_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from hed.validator import SpreadsheetValidator
from hed import SpreadsheetInput


class TestInsertColumns(unittest.TestCase):
class TestSpreadsheetValidation(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.schema = load_schema_version("8.1.0")
Expand Down

0 comments on commit c68ddd8

Please sign in to comment.