diff options
| author | Tim Graham <timograham@gmail.com> | 2019-01-29 10:05:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-29 10:05:10 -0500 |
| commit | 9a0cc54524422dbdd9213e83a8ad7e8a4c13bd3e (patch) | |
| tree | 0c439c0c094ae74ccfe8b5da192738905056e250 /tests/template_tests | |
| parent | 14581553e4ce9918aeb427fee7e5d7b6681e4e85 (diff) | |
Refs #30137 -- Fixed template test on Windows.
Broken in 7785e03ba89aafbd949191f126361fb9103cb980.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/test_loaders.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py index 9023457751..3c5282a8ea 100644 --- a/tests/template_tests/test_loaders.py +++ b/tests/template_tests/test_loaders.py @@ -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') |
