def test_remove_deep_dir(self):
        cmd = CmdDataRemove(self.settings)
        cmd.parsed_args.keep_in_cloud = True
        cmd.parsed_args.recursive = True

        dir1_dvc_name = os.path.join('data', self.dir1)
        self.assertTrue(os.path.exists(dir1_dvc_name))

        cmd.remove_dir(dir1_dvc_name)
        self.assertFalse(os.path.exists(dir1_dvc_name))
    def test_data_dir_removal(self):
        cmd = CmdDataRemove(self.settings)
        cmd.parsed_args.keep_in_cloud = True
        cmd.parsed_args.recursive = True

        data_dir = 'data'
        self.assertTrue(os.path.exists(data_dir))

        with self.assertRaises(DataRemoveError):
            cmd.remove_dir(data_dir)
        pass
    def test_not_recursive_removal(self):
        cmd = CmdDataRemove(self.settings)
        cmd.parsed_args.keep_in_cloud = True
        cmd.parsed_args.recursive = False

        dir1_dvc_name = os.path.join('data', self.dir1)
        self.assertTrue(os.path.exists(dir1_dvc_name))

        with self.assertRaises(DataRemoveError):
            cmd.remove_dir(dir1_dvc_name)
        pass