def test_which_set():
    skip_if_no_sklearn()

    # one label
    this_yaml = test_yaml_which_set % {'which_set': 'train'}
    trainer = yaml_parse.load(this_yaml)
    trainer.main_loop()

    # multiple labels
    this_yaml = test_yaml_which_set % {'which_set': ['train', 'test']}
    trainer = yaml_parse.load(this_yaml)
    trainer.main_loop()

    # improper label (iterator only returns 'train' and 'test' subsets)
    this_yaml = test_yaml_which_set % {'which_set': 'valid'}
    try:
        trainer = yaml_parse.load(this_yaml)
        trainer.main_loop()
        raise AssertionError
    except ValueError:
        pass

    # bogus label (not in approved list)
    this_yaml = test_yaml_which_set % {'which_set': 'bogus'}
    try:
        yaml_parse.load(this_yaml)
        raise AssertionError
    except ValueError:
        pass
When the cluster configuration includes a node with several
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/cross_validation/tests/test_dataset_iterators.py/test_which_set--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/control/test/test_httpapi.py/GetDatasetConfigurationTestsMixin.test_several_datasets