bugfix and tests for no settings path (no -s option)

This commit is contained in:
Deniz Turgut 2013-04-19 23:35:09 -04:00
commit e86f4eedcf
2 changed files with 12 additions and 5 deletions

View file

@ -150,6 +150,10 @@ class TestUtils(LoggedTestCase):
self.assertEqual(next(folder_watcher), True)
self.assertEqual(next(file_watcher), True)
# file watcher with None or empty path should return None
self.assertEqual(next(utils.file_watcher('')), None)
self.assertEqual(next(utils.file_watcher(None)), None)
empty_path = os.path.join(os.path.dirname(__file__), 'empty')
try:
os.mkdir(empty_path)