From fed5e19369f456e41f0768f4fb92602af027a46d Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 24 Jul 2019 13:32:02 +0200 Subject: Removed unused BaseReloader.watch_file(). Unused since its introduction in c8720e7696ca41f3262d5369365cc1bd72a216ca. --- tests/utils_tests/test_autoreload.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'tests/utils_tests') diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py index 628749db01..5de276f035 100644 --- a/tests/utils_tests/test_autoreload.py +++ b/tests/utils_tests/test_autoreload.py @@ -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()) -- cgit v1.3