1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

Refs #30137 -- Fixed template test on Windows.

Broken in 7785e03ba89aafbd949191f126361fb9103cb980.
This commit is contained in:
Tim Graham 2019-01-29 10:05:10 -05:00 committed by GitHub
parent 14581553e4
commit 9a0cc54524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,8 @@ class FileSystemLoaderTests(SimpleTestCase):
self.engine.get_template(tmpfile.name)
def test_notafile_error(self):
with self.assertRaises(IsADirectoryError):
# Windows raises PermissionError when trying to open a directory.
with self.assertRaises(PermissionError if sys.platform.startswith('win') else IsADirectoryError):
self.engine.get_template('first')