forked from github/pelican
Implemented better "valid files not found" behavior.
Used an exception so show error state. Used a bool flag to make sure the error is only shown once PER error. Updated tests to check for the correct Exception raised
This commit is contained in:
parent
86da6d1f2e
commit
a37ba369ef
3 changed files with 14 additions and 5 deletions
|
|
@ -96,8 +96,8 @@ class TestUtils(unittest.TestCase):
|
|||
os.mkdir(empty_path)
|
||||
os.mkdir(os.path.join(empty_path, "empty_folder"))
|
||||
shutil.copy(__file__, empty_path)
|
||||
changed = utils.files_changed(empty_path, 'rst')
|
||||
self.assertFalse(changed)
|
||||
with self.assertRaises(NoFilesError):
|
||||
utils.files_changed(empty_path, 'rst')
|
||||
except OSError:
|
||||
self.fail("OSError Exception in test_files_changed test")
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue