From: Christian Heller Date: Tue, 24 Dec 2024 08:22:43 +0000 (+0100) Subject: Minor test code clean-up. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_id%7D%7D?a=commitdiff_plain;h=bab37dca1d7cca999cdd552ba01c9f6e803f7e94;p=plomtask Minor test code clean-up. --- diff --git a/scripts/pre-commit b/scripts/pre-commit index e448035..7abafb9 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -1,6 +1,5 @@ #!/bin/sh set -e -# for dir in $(echo 'tests'); do for dir in $(echo '.' 'plomtask' 'tests'); do echo "Running mypy on ${dir}/ …." python3 -m mypy --strict ${dir}/*.py diff --git a/tests/processes.py b/tests/processes.py index 16206cc..8f8e2c6 100644 --- a/tests/processes.py +++ b/tests/processes.py @@ -315,11 +315,8 @@ class TestsWithServer(TestCaseWithServer): exp.lib_set('ProcessStep', [exp.procstep_as_dict( 11, owner_id=8, step_process_id=7)]) self.check_post(p_min | p | {'new_top_step': 8}, url, 400) - # fail on single-step recursion via explicit sub-step - self.check_json_get(url, exp) + # fail on single- and double-step recursion via explicit sub-step self.check_post(p_min | p | {'new_step_to_8': 7}, url, 400) - # fail on double-step recursion via explicit sub-step - self.check_json_get(url, exp) self.check_post(p_min | p | {'new_step_to_8': 8}, url, 400) def test_fail_GET_process(self) -> None: