# Path: peru/async_helpers.py
# def run_task(coro):
#     return EVENT_LOOP.run_until_complete(coro)


import asyncio
import contextlib
import hashlib
import io
import os
import shutil
import subprocess
import textwrap
import unittest
import peru.plugin as plugin
import shared
from collections import defaultdict
from pathlib import Path
from peru.async_helpers import run_task
from shared import SvnRepo, GitRepo, HgRepo, assert_contents



class TestDisplayHandle(io.StringIO):
    def __enter__(self):
        return self

    def __exit__(self, *args):
        pass


def test_plugin_fetch(context, type, fields, dest):
    handle = TestDisplayHandle()

# Path: peru/async_helpers.py
# def run_task(coro):
#     return EVENT_LOOP.run_until_complete(coro)


# Path: tests/test_plugins.py
import asyncio
import contextlib
import hashlib
import io
import os
import shutil
import subprocess
import textwrap
import unittest
import peru.plugin as plugin
import shared
from collections import defaultdict
from pathlib import Path
from peru.async_helpers import run_task
from shared import SvnRepo, GitRepo, HgRepo, assert_contents




class TestDisplayHandle(io.StringIO):
    def __enter__(self):
        return self

    def __exit__(self, *args):
        pass


def test_plugin_fetch(context, type, fields, dest):
    handle = TestDisplayHandle()

    run_task(plugin.plugin_fetch(context, type, fields, dest, handle))