'This test demonstrates the difference between name and desgination
in grouping patterns and named patterns such as __designation__,
__name__, __designation_and_ext__, and __name_and_ext__.'

def test_name_versus_designation(self):

    self._replace_output_collectors('<output>\n                                                <discover_datasets    pattern="__name_and_ext__"    directory="subdir_for_name_discovery"    />\n                                                <discover_datasets    pattern="__designation_and_ext__"    directory="subdir_for_designation_discovery"    />\n                                </output>')
    self._setup_extra_file(subdir='subdir_for_name_discovery', filename='example1.txt')
    self._setup_extra_file(subdir='subdir_for_designation_discovery', filename='example2.txt')
    primary_outputs = self._collect()[DEFAULT_TOOL_OUTPUT]
    name_output = primary_outputs['example1']
    designation_output = primary_outputs['example2']
    assert (name_output.name == 'example1')
    assert (designation_output.name == ('%s    (%s)' % (self.hda.name, 'example2')))
