diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-08 14:52:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 19:52:37 +0000 |
commit | 4eed7b2ede2a40aa4ac59eb21d2e13dfffbb6d53 (patch) | |
tree | b3199bd270c76921293cfa80131f15604438d657 /tests/test_test_utils.py | |
parent | Limit concurrent event creation for a room to avoid state resolution when sen... (diff) | |
download | synapse-4eed7b2ede2a40aa4ac59eb21d2e13dfffbb6d53.tar.xz |
Add missing type hints to tests. (#15027)
Diffstat (limited to 'tests/test_test_utils.py')
-rw-r--r-- | tests/test_test_utils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_test_utils.py b/tests/test_test_utils.py index d04bcae0fa..5cd698147e 100644 --- a/tests/test_test_utils.py +++ b/tests/test_test_utils.py @@ -17,25 +17,25 @@ from tests.utils import MockClock class MockClockTestCase(unittest.TestCase): - def setUp(self): + def setUp(self) -> None: self.clock = MockClock() - def test_advance_time(self): + def test_advance_time(self) -> None: start_time = self.clock.time() self.clock.advance_time(20) self.assertEqual(20, self.clock.time() - start_time) - def test_later(self): + def test_later(self) -> None: invoked = [0, 0] - def _cb0(): + def _cb0() -> None: invoked[0] = 1 self.clock.call_later(10, _cb0) - def _cb1(): + def _cb1() -> None: invoked[1] = 1 self.clock.call_later(20, _cb1) @@ -51,15 +51,15 @@ class MockClockTestCase(unittest.TestCase): self.assertTrue(invoked[1]) - def test_cancel_later(self): + def test_cancel_later(self) -> None: invoked = [0, 0] - def _cb0(): + def _cb0() -> None: invoked[0] = 1 t0 = self.clock.call_later(10, _cb0) - def _cb1(): + def _cb1() -> None: invoked[1] = 1 self.clock.call_later(20, _cb1) |