diff options
author | 2022-06-24 05:06:35 +0400 | |
---|---|---|
committer | 2022-06-24 05:06:35 +0400 | |
commit | 28b6d4c8b8f7bc6c6230b42c2e2db376be559562 (patch) | |
tree | 5309cfa3e5c2f748fdb02e1ded508c2085fbf33e /resources/unittest_template.py | |
parent | Merge pull request #173 from adriangb/asgi-middleware (diff) |
Allow Setup For Unittests
Adds the setup method as a special method for unittest question types.
Additionally, a couple QoL fixes are included. I changed `unit` to
`self` to clarify what it actually is, and I changed an `lstrip` to a
`removeprefix` to avoid removing unintentional portions of the name
(for instance `something` -> `omething`)
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'resources/unittest_template.py')
-rw-r--r-- | resources/unittest_template.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/unittest_template.py b/resources/unittest_template.py index 05730ce..6f704f3 100644 --- a/resources/unittest_template.py +++ b/resources/unittest_template.py @@ -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) )) ) |