def test_dictionary_keys_ucr_dataset_info(dataset): """Test that the length of the dictionart is the expected one.""" keys_expected = ['n_classes', 'n_timestamps', 'test_size', 'train_size', 'type'] dictionary = ucr_dataset_info(dataset) if 'train_size' in dictionary.keys(): assert sorted(list(dictionary.keys())) == keys_expected else: for key in dictionary.keys(): assert sorted(list(dictionary[key].keys())) == keys_expected
def test_dictionary_length_uea_dataset_info(dataset, length_expected): """Test that the length of the dictionart is the expected one.""" assert len(ucr_dataset_info(dataset)) == length_expected
def test_parameter_check_uea_dataset_info(dataset, err_msg): """Test parameter validation.""" with pytest.raises(ValueError, match=re.escape(err_msg)): ucr_dataset_info(dataset)