def test_nonempty_subdir_to_nonempty_dir(self):
        source_subdir = os.path.join(self.source_dir, 'mysubdir')
        os.mkdir(source_subdir)
        tt.touch(os.path.join(source_subdir, 'foo.csv'))

        dest_subdir = os.path.join(self.dest_dir, 'mysubdir')
        os.mkdir(dest_subdir)
        tt.touch(os.path.join(dest_subdir, 'bar.csv'))


        self.cmd = """%(pgm)s %(source_dir)s       \
                              %(dest_dir)s         \
                         --match-on-name-only      \
                         --dry-run                 \
                         --log-level debug         \
                   """ % {'pgm': PGM,
                          'source_dir': self.source_dir,
                          'dest_dir':   self.dest_dir}
        print '\n command: %s' % self.cmd

        r = envoy.run(self.cmd)
        self.get_outputs(r)

        assert r.status_code      == 0
        assert 'mysubdir' in os.listdir(self.dest_dir)
        assert 'bar.csv'  in os.listdir(os.path.join(self.dest_dir, 'mysubdir'))
        assert 'mysubdir' in os.listdir(self.source_dir)
        assert 'foo.csv'  in os.listdir(os.path.join(self.source_dir, 'mysubdir'))
starting dirs & files:
dataset/ETHPy150Open kenfar/DataGristle/scripts/tests/test_gristle_dir_merger_cmd.py/TestDryRun.test_nonempty_subdir_to_nonempty_dir