From: Christian Heller Date: Sun, 5 May 2024 00:45:26 +0000 (+0200) Subject: Extend tests. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/edit?a=commitdiff_plain;h=c4ccb784bb3a83c1c614c9bab7fc007ee17f6615;p=plomtask Extend tests. --- diff --git a/tests/__pycache__/__init__.cpython-311.pyc b/tests/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..61bbc59 Binary files /dev/null and b/tests/__pycache__/__init__.cpython-311.pyc differ diff --git a/tests/__pycache__/conditions.cpython-311.pyc b/tests/__pycache__/conditions.cpython-311.pyc new file mode 100644 index 0000000..252bf75 Binary files /dev/null and b/tests/__pycache__/conditions.cpython-311.pyc differ diff --git a/tests/__pycache__/days.cpython-311.pyc b/tests/__pycache__/days.cpython-311.pyc new file mode 100644 index 0000000..fcbd24a Binary files /dev/null and b/tests/__pycache__/days.cpython-311.pyc differ diff --git a/tests/__pycache__/misc.cpython-311.pyc b/tests/__pycache__/misc.cpython-311.pyc new file mode 100644 index 0000000..edb0671 Binary files /dev/null and b/tests/__pycache__/misc.cpython-311.pyc differ diff --git a/tests/__pycache__/processes.cpython-311.pyc b/tests/__pycache__/processes.cpython-311.pyc new file mode 100644 index 0000000..92b1fcd Binary files /dev/null and b/tests/__pycache__/processes.cpython-311.pyc differ diff --git a/tests/__pycache__/test_days.cpython-311.pyc b/tests/__pycache__/test_days.cpython-311.pyc new file mode 100644 index 0000000..61f606c Binary files /dev/null and b/tests/__pycache__/test_days.cpython-311.pyc differ diff --git a/tests/__pycache__/todos.cpython-311.pyc b/tests/__pycache__/todos.cpython-311.pyc new file mode 100644 index 0000000..0369c07 Binary files /dev/null and b/tests/__pycache__/todos.cpython-311.pyc differ diff --git a/tests/__pycache__/utils.cpython-311.pyc b/tests/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000..722fd58 Binary files /dev/null and b/tests/__pycache__/utils.cpython-311.pyc differ diff --git a/tests/__pycache__/versioned_attributes.cpython-311.pyc b/tests/__pycache__/versioned_attributes.cpython-311.pyc new file mode 100644 index 0000000..2e15b71 Binary files /dev/null and b/tests/__pycache__/versioned_attributes.cpython-311.pyc differ diff --git a/tests/processes.py b/tests/processes.py index c3b1144..8616008 100644 --- a/tests/processes.py +++ b/tests/processes.py @@ -22,6 +22,15 @@ class TestsSansDB(TestCaseSansDB): 'effort': 1.0}) +class TestsSansDBProcessStep(TestCaseSansDB): + """Module tests not requiring DB setup.""" + checked_class = ProcessStep + + def test_ProcessStep_id_setting(self) -> None: + """Test .id_ being set and its legal range being enforced.""" + self.check_id_setting(2, 3, 4) + + class TestsWithDB(TestCaseWithDB): """Module tests requiring DB setup.""" checked_class = Process diff --git a/tests/utils.py b/tests/utils.py index ccb485a..fbe739d 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -19,11 +19,11 @@ class TestCaseSansDB(TestCase): """Tests requiring no DB setup.""" checked_class: Any - def check_id_setting(self) -> None: + def check_id_setting(self, *args: Any) -> None: """Test .id_ being set and its legal range being enforced.""" with self.assertRaises(HandledException): - self.checked_class(0) - obj = self.checked_class(5) + self.checked_class(0, *args) + obj = self.checked_class(5, *args) self.assertEqual(obj.id_, 5) def check_versioned_defaults(self, attrs: dict[str, Any]) -> None: