-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
162 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
VectorData: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... | ||
DataType2: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
VectorData: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... | ||
DataType2: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
VectorData: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... | ||
DataType2: | ||
namespace: | ||
namespace_version: | ||
fields: | ||
data: /Users/mavaylon/Research/NWB/hdmf2/hdmf/tests/unit/example_test_term_set.yaml | ||
field2: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
from hdmf.testing import TestCase | ||
from hdmf import get_termset_config, load_termset_config, unload_termset_config | ||
from hdmf.term_set import TermSetConfigurator | ||
|
||
class TestConfig(TestCase): | ||
self.test_config = {} | ||
self.test_merged_extension_config = {} | ||
self.hdmf_config = {} | ||
|
||
def test_construct_config(self): | ||
# add asserts for self.path and self.config | ||
test_config = TermSetConfigurator(path='tests/unit/test_config.yaml') | ||
self.assertEqual(test_config.path, ['tests/unit/test_config.yaml']) | ||
# self.assertEqual(test_config.config, None) | ||
|
||
def test_load_termset_config(self): | ||
test_config = TermSetConfigurator(path='tests/unit/test_config.yaml') | ||
test_config.load_termset_config(path='tests/unit/test_extension_config.yaml') | ||
self.assertEqual(config.path, ['tests/unit/test_config.yaml', 'tests/unit/test_extension_config.yaml']) | ||
# self.assertEqual(config.config, None) | ||
|
||
def test_unload_termset_config(self): | ||
test_config = TermSetConfigurator(path='tests/unit/test_config.yaml') | ||
test_config.unload_termset_config() | ||
self.assertEqual(config.path, ['src/hdmf/hdmf_config.yaml']) | ||
self.assertEqual(config.config, None) | ||
|
||
def test_get_termset_config(self): | ||
config = get_termset_config() | ||
self.assertEqual(config.path, ['src/hdmf/hdmf_config.yaml']) | ||
# self.assertEqual(config.config, None) | ||
|
||
def test_unload_global_config(self): | ||
config = get_termset_config() | ||
unload_termset_config() | ||
self.assertEqual(config.path, ['src/hdmf/hdmf_config.yaml']) | ||
self.assertEqual(config.config, None) | ||
|
||
def test_load_global_config_reset(self): | ||
load_termset_config() | ||
self.assertEqual(config.path, ['src/hdmf/hdmf_config.yaml']) | ||
# self.assertEqual(config.config, None) | ||
|
||
def test_load_global_config_extension_config(self): | ||
load_termset_config() | ||
self.assertEqual(config.path, ['tests/unit/test_config.yaml', 'tests/unit/test_extension_config.yaml']) | ||
# self.assertEqual(config.config, None) | ||
|
||
def test_data(self): | ||
pass | ||
|
||
def test_dataset_not_in_spec(self): | ||
pass | ||
|
||
def test_attribute_not_in_spec(self): | ||
pass | ||
|
||
def test_attriute_in_spec(self): | ||
pass | ||
|
||
def test_dataset_in_spec(self): | ||
pass | ||
|
||
def test_data_type_not_in_namespace(self): | ||
pass | ||
|
||
def test_warn_not_wrapped(self): | ||
pass |