# Path: ephypype/gather/gather_results.py
# def get_results(workflow_path, workflow_name, pipeline=None):
#     """Get results files.
# 
#     Parameters
#     ----------
#        workflow_path : str
#            Path of connectivity workflow
#        workflow_name : str
#            Name of the connectivity workflow
#        pipeline : str
#            name of the pipeline (possible values: 'connectivity', 'inverse',
#            'psd', 'ica')
# 
#     Returns
#     -------
#         matrices : list of str
#             List of path of results
#     """
#     if pipeline == 'connectivity':
#         result_file = '*.npy'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'power':
#         result_file = '*.npz'
#         label_file = '*coords.txt'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'inverse':
#         result_file = '*.npy'
#         label_file = '*.pkl'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'ica':
#         result_file = '*ica_solution.fif'
#         label_file = '*ica.fif'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'tfr_morlet':
#         result_file = '*-tfr.h5'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*')
# 
#     elif pipeline == 'compute_evoked':
#         result_file = '*-ave.fif'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     results_files = _get_list(node_path, result_file)
# 
#     if label_file:
#         labels_file = _get_list(node_path, label_file)
#     else:
#         labels_file = None
# 
#     return results_files, labels_file


from ephypype.gather.gather_results import get_results
"""Test gather."""



def test_get_results():

    pipeline_names = ['connectivity', 'power', 'inverse', 'ica', 'tfr_morlet']

    for name in pipeline_names:

# Path: ephypype/gather/gather_results.py
# def get_results(workflow_path, workflow_name, pipeline=None):
#     """Get results files.
# 
#     Parameters
#     ----------
#        workflow_path : str
#            Path of connectivity workflow
#        workflow_name : str
#            Name of the connectivity workflow
#        pipeline : str
#            name of the pipeline (possible values: 'connectivity', 'inverse',
#            'psd', 'ica')
# 
#     Returns
#     -------
#         matrices : list of str
#             List of path of results
#     """
#     if pipeline == 'connectivity':
#         result_file = '*.npy'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'power':
#         result_file = '*.npz'
#         label_file = '*coords.txt'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'inverse':
#         result_file = '*.npy'
#         label_file = '*.pkl'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'ica':
#         result_file = '*ica_solution.fif'
#         label_file = '*ica.fif'
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     elif pipeline == 'tfr_morlet':
#         result_file = '*-tfr.h5'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*')
# 
#     elif pipeline == 'compute_evoked':
#         result_file = '*-ave.fif'
#         label_file = None
#         node_path = op.join(workflow_path, workflow_name, '*', '*', '*')
# 
#     results_files = _get_list(node_path, result_file)
# 
#     if label_file:
#         labels_file = _get_list(node_path, label_file)
#     else:
#         labels_file = None
# 
#     return results_files, labels_file


# Path: ephypype/gather/tests/test_gather.py
from ephypype.gather.gather_results import get_results

"""Test gather."""



def test_get_results():

    pipeline_names = ['connectivity', 'power', 'inverse', 'ica', 'tfr_morlet']

    for name in pipeline_names:

        res = get_results('',  '', name)