mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed BasicExtractorTests.test_makemessages_find_files() test.
This commit is contained in:
parent
2d23a07817
commit
7bdb682215
@ -508,17 +508,19 @@ class BasicExtractorTests(ExtractorTests):
|
|||||||
cmd.ignore_patterns = ["CVS", ".*", "*~", "*.pyc"]
|
cmd.ignore_patterns = ["CVS", ".*", "*~", "*.pyc"]
|
||||||
cmd.symlinks = False
|
cmd.symlinks = False
|
||||||
cmd.domain = "django"
|
cmd.domain = "django"
|
||||||
cmd.extensions = ["html", "txt", "py"]
|
cmd.extensions = [".html", ".txt", ".py"]
|
||||||
cmd.verbosity = 0
|
cmd.verbosity = 0
|
||||||
cmd.locale_paths = []
|
cmd.locale_paths = []
|
||||||
cmd.default_locale_path = os.path.join(self.test_dir, "locale")
|
cmd.default_locale_path = os.path.join(self.test_dir, "locale")
|
||||||
found_files = cmd.find_files(self.test_dir)
|
found_files = cmd.find_files(self.test_dir)
|
||||||
|
self.assertGreater(len(found_files), 1)
|
||||||
found_exts = {os.path.splitext(tfile.file)[1] for tfile in found_files}
|
found_exts = {os.path.splitext(tfile.file)[1] for tfile in found_files}
|
||||||
self.assertEqual(found_exts.difference({".py", ".html", ".txt"}), set())
|
self.assertEqual(found_exts.difference({".py", ".html", ".txt"}), set())
|
||||||
|
|
||||||
cmd.extensions = ["js"]
|
cmd.extensions = [".js"]
|
||||||
cmd.domain = "djangojs"
|
cmd.domain = "djangojs"
|
||||||
found_files = cmd.find_files(self.test_dir)
|
found_files = cmd.find_files(self.test_dir)
|
||||||
|
self.assertGreater(len(found_files), 1)
|
||||||
found_exts = {os.path.splitext(tfile.file)[1] for tfile in found_files}
|
found_exts = {os.path.splitext(tfile.file)[1] for tfile in found_files}
|
||||||
self.assertEqual(found_exts.difference({".js"}), set())
|
self.assertEqual(found_exts.difference({".js"}), set())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user