1
0
Fork 0
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:
tBunnyMan 2012-08-23 12:44:22 -07:00
commit a37ba369ef
3 changed files with 14 additions and 5 deletions

View file

@ -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: