mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Removed unused BaseReloader.watch_file().
Unused since its introduction in c8720e7696
.
This commit is contained in:
parent
d89053585e
commit
fed5e19369
2 changed files with 0 additions and 25 deletions
|
@ -416,15 +416,6 @@ class ReloaderTests(SimpleTestCase):
|
|||
|
||||
|
||||
class IntegrationTests:
|
||||
@mock.patch('django.utils.autoreload.BaseReloader.notify_file_changed')
|
||||
@mock.patch('django.utils.autoreload.iter_all_python_module_files', return_value=frozenset())
|
||||
def test_file(self, mocked_modules, notify_mock):
|
||||
self.reloader.watch_file(self.existing_file)
|
||||
with self.tick_twice():
|
||||
self.increment_mtime(self.existing_file)
|
||||
self.assertEqual(notify_mock.call_count, 1)
|
||||
self.assertCountEqual(notify_mock.call_args[0], [self.existing_file])
|
||||
|
||||
@mock.patch('django.utils.autoreload.BaseReloader.notify_file_changed')
|
||||
@mock.patch('django.utils.autoreload.iter_all_python_module_files', return_value=frozenset())
|
||||
def test_glob(self, mocked_modules, notify_mock):
|
||||
|
@ -508,15 +499,6 @@ class IntegrationTests:
|
|||
class BaseReloaderTests(ReloaderTests):
|
||||
RELOADER_CLS = autoreload.BaseReloader
|
||||
|
||||
def test_watch_without_absolute(self):
|
||||
with self.assertRaisesMessage(ValueError, 'test.py must be absolute.'):
|
||||
self.reloader.watch_file('test.py')
|
||||
|
||||
def test_watch_with_single_file(self):
|
||||
self.reloader.watch_file(self.existing_file)
|
||||
watched_files = list(self.reloader.watched_files())
|
||||
self.assertIn(self.existing_file, watched_files)
|
||||
|
||||
def test_watch_with_glob(self):
|
||||
self.reloader.watch_dir(self.tempdir, '*.py')
|
||||
watched_files = list(self.reloader.watched_files())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue