Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into attribute_syntax_lockdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Dec 12, 2016
2 parents 77404ca + 583c0a3 commit 6407df0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hamlpy/hamlpy_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,5 @@ def compile_file(fullpath, outfile_name, compiler_args):
return False


if __name__ == '__main__':
if __name__ == '__main__': # pragma: no cover
watch_folder()
4 changes: 4 additions & 0 deletions hamlpy/test/test_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_watch_folder(self):
# create some haml files for testing
self._write_file(INPUT_DIR + os.sep + 'test.haml', "%span{'class': 'test'}\n- shoutout\n")
self._write_file(INPUT_DIR + os.sep + 'error.haml', "%div{")
self._write_file(INPUT_DIR + os.sep + '.#test.haml', "%hr") # will be ignored

# run as once off pass - should return 1 for number of failed conversions
self._run_script([
Expand All @@ -45,6 +46,9 @@ def test_watch_folder(self):
self.assertFileContents(OUTPUT_DIR + os.sep + 'test.html',
"<span class='test'></span>\n{% shoutout %}\n{% endshoutout %}\n")

# check .#test.haml was ignored
assert not os.path.exists(OUTPUT_DIR + os.sep + '.#test.html')

# run without output directory which should make it default to re-using the input directory
self._run_script([
'hamlpy_watcher.py',
Expand Down

0 comments on commit 6407df0

Please sign in to comment.