aboutsummaryrefslogtreecommitdiffstats
path: root/resources/unittest_template.py
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-24 06:01:41 +0400
committerGravatar GitHub <[email protected]>2022-06-24 06:01:41 +0400
commitc615219749e3deabe48943f763623f5d8545bf80 (patch)
treea4dd7185e44b96cd114a8f062c4c72c8d6b626c6 /resources/unittest_template.py
parentMerge pull request #173 from adriangb/asgi-middleware (diff)
parentMake Unittests Async (diff)
Merge pull request #179 from python-discord/add-setup
Allow Setup For Unittests
Diffstat (limited to 'resources/unittest_template.py')
-rw-r--r--resources/unittest_template.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/unittest_template.py b/resources/unittest_template.py
index 05730ce..104b3b4 100644
--- a/resources/unittest_template.py
+++ b/resources/unittest_template.py
@@ -15,7 +15,7 @@ from unittest import mock
### USER CODE
-class RunnerTestCase(unittest.TestCase):
+class RunnerTestCase(unittest.IsolatedAsyncioTestCase):
### UNIT CODE
@@ -64,8 +64,8 @@ def _main() -> None:
if not result.wasSuccessful():
RESULT.write(
";".join(chain(
- (error[0]._testMethodName.lstrip("test_") for error in result.errors),
- (failure[0]._testMethodName.lstrip("test_") for failure in result.failures)
+ (error[0]._testMethodName.removeprefix("test_") for error in result.errors),
+ (failure[0]._testMethodName.removeprefix("test_") for failure in result.failures)
))
)