def test_minify(): assert minify.minify_html(test_html) == test_result
def _save(text, dest_path): """Apply optional HTML minification to the [text] and save it to file.""" if conf.get('min_html') and helpers.ext(dest_path) == '.html': text = minify.minify_html(text) with codecs.open(dest_path, mode='w', encoding='utf-8') as f: f.write(text)