File: __init__.py

package info (click to toggle)
python-inject 5.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: python: 1,039; makefile: 28; sh: 5
file content (12 lines) | stat: -rw-r--r-- 270 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from unittest import TestCase
import asyncio
import inject


class BaseTestInject(TestCase):
    def tearDown(self):
        inject.clear()
    
    def run_async(self, awaitable):
        loop = asyncio.get_event_loop()
        return loop.run_until_complete(awaitable)