diff --git a/test/test_config.py b/test/test_config.py index 3df69881..f020d634 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -104,4 +104,12 @@ def test_config_container_registry(self): assert (config.config.container_prefix == config.DEFAULT_CONTAINER_PREFIX) def test_dataset_label(self): - # TODO: test differnt invalid labels and combinationst that aren't allowed \ No newline at end of file + test_config = get_test_config() + + error_test_dicts = [{"label":"test$"}, {"label":"@test'"}, {"label":"[test]"}, {"label":"test-test"}, {"label":"✉"}, {"label":"test/test-2____te+st&te'st*868_"}] + + for test_dict in error_test_dicts: + test_config["datasets"]= [test_dict] + with pytest.raises(ValueError): #raises error if any chars other than letters, numbers, or underscores are in dataset label + config.init_global(test_config) +