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:
parent
14581553e4
commit
9a0cc54524
@ -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')
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user