1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #30213 -- Removed post-startup check for Watchman availability.

This is checked at startup in get_reloader(). The runtime check ties
the implementation to Watchman excessively.
This commit is contained in:
Carlton Gibson
2022-07-05 10:46:10 +02:00
committed by Carlton Gibson
parent 35911078fa
commit e34dfad0a3
2 changed files with 1 additions and 20 deletions

View File

@@ -381,16 +381,6 @@ class RunWithReloaderTests(SimpleTestCase):
class StartDjangoTests(SimpleTestCase):
@mock.patch("django.utils.autoreload.StatReloader")
def test_watchman_becomes_unavailable(self, mocked_stat):
mocked_stat.should_stop.return_value = True
fake_reloader = mock.MagicMock()
fake_reloader.should_stop = False
fake_reloader.run.side_effect = autoreload.WatchmanUnavailable()
autoreload.start_django(fake_reloader, lambda: None)
self.assertEqual(mocked_stat.call_count, 1)
@mock.patch("django.utils.autoreload.ensure_echo_on")
def test_echo_on_called(self, mocked_echo):
fake_reloader = mock.MagicMock()