aboutsummaryrefslogtreecommitdiffstats
path: root/resources/unittest_template.py (follow)
Commit message (Collapse)AuthorAgeLines
* KUTIEKAT ALWAYS LINTS BEFORE PUSHINGGravatar Joe Banks2025-07-22-1/+1
|
* Add dynamic module loading fix for dataclassesGravatar Janine vN2025-07-22-0/+6
|
* Scope Variables In Unittest TemplateGravatar Hassan Abouelela2022-07-01-30/+37
| | | | | | | Isolates the global variables in the unittest template into a function, to prevent them from being imported. Signed-off-by: Hassan Abouelela <[email protected]>
* Make Unittests AsyncGravatar Hassan Abouelela2022-06-24-1/+1
| | | | | | | | The codejam test suite uses async functions, which would be annoying to deal with in our current template. Switching to async makes that available to those who want it, without affecting those who don't. Signed-off-by: Hassan Abouelela <[email protected]>
* Allow Setup For UnittestsGravatar Hassan Abouelela2022-06-24-2/+2
| | | | | | | | | | 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]>
* Handle BaseException In Code QuestionGravatar Hassan Abouelela2022-02-15-4/+11
| | | | | | | | Change the exception handler in the unittest template to handle BaseExceptions that don't inherit from Exception. Additionally, account for user invoked system exits. Signed-off-by: Hassan Abouelela <[email protected]>
* Patch `sys.__stdout__` In Code QuestionsGravatar Hassan Abouelela2022-02-15-4/+4
| | | | | | | | Patching just `sys.stdout` allowed users to still access stdout via `sys.__stdout__`. The same was true for stderr. Both have been explicitly patched now. Signed-off-by: Hassan Abouelela <[email protected]>
* Use base64 encoded code snippetsGravatar Matteo Bertucci2021-02-26-2/+4
|
* Add return code 7 for processes killed by NsJailGravatar Matteo Bertucci2021-02-25-0/+2
|
* Add return code 6 for exceptions when loading moduleGravatar Matteo Bertucci2021-02-25-3/+8
|
* Don't communicate the traceback back to the backendGravatar Matteo Bertucci2021-02-24-2/+1
|
* Move most of the unittest template inside of the handlerGravatar Matteo Bertucci2021-02-24-12/+11
|
* Document unittest codeGravatar Matteo Bertucci2021-02-24-6/+7
|
* Don't lint the unittest templateGravatar Matteo Bertucci2021-02-24-0/+1
|
* Add unittest templateGravatar Matteo Bertucci2021-02-24-0/+81