Refs #30137 -- Fixed template test on Windows.

Broken in 7785e03ba8.
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
1 changed files with 2 additions and 1 deletions

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')