diff --git a/evennia/scripts/tests.py b/evennia/scripts/tests.py index 51a244a1c9..aa0b97d1ec 100644 --- a/evennia/scripts/tests.py +++ b/evennia/scripts/tests.py @@ -143,6 +143,13 @@ class TestExtendedLoopingCall(TestCase): self.assertEqual(loopcall.interval, 20) loopcall._scheduleFrom.assert_called_with(121) + def test_start_invalid_interval(self): + """ Test the .start method with interval less than zero """ + with self.assertRaises(ValueError): + callback = mock.MagicMock() + loopcall = ExtendedLoopingCall(callback) + loopcall.start(-1, now=True, start_delay=None, count_start=1) + def dummy_func(): return 0 class TestMonitorHandler(TestCase):