Skip to content

Commit 23d0e87

Browse files
Ensure All Tests Are Prefixed By test_
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
1 parent c615219 commit 23d0e87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/routes/forms/unittesting.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def _make_unit_code(units: dict[str, str]) -> str:
4040
if unit_name == "setUp":
4141
result += "\ndef setUp(self):"
4242
else:
43-
result += f"\nasync def {unit_name.removeprefix('#')}(self):"
43+
name = f"test_{unit_name.removeprefix('#').removeprefix('test_')}"
44+
result += f"\nasync def {name}(self):"
4445

4546
# Unite code
4647
result += f"\n{indent(unit_code, ' ')}"

0 commit comments

Comments
 (0)