pystache.tests.test_pystache module

class pystache.tests.test_pystache.PystacheTests(methodName='runTest')[source]

Bases: TestCase

non_strings_expected = '(123 & ['something'])(chris & 0.9)'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test__section__non_false_value()[source]

Test when a section value is a (non-list) “non-false value”.

From mustache(5):

When the value [of a section key] is non-false but not a list, it will be used as the context for a single rendering of the block.

test_basic()[source]
test_comments()[source]
test_even_less_basic()[source]
test_false_sections_are_hidden()[source]
test_ignores_misses()[source]
test_implicit_iterator()[source]
test_kwargs()[source]
test_later_list_section_with_escapable_character()[source]

This is a simple test case intended to cover issue #53.

The test case failed with markupsafe enabled, as follows:

AssertionError: Markup(u’foo &lt;’) != ‘foo <’

test_less_basic()[source]
test_non_strings()[source]
test_render_zero()[source]
test_sections()[source]
test_surrounding_whitepace_not_altered()[source]
test_true_sections_are_shown()[source]
test_unicode()[source]