assert func('FOO.TXT') == False
-@pytest.mark.utils
-@pytest.mark.markupleak
-@pytest.mark.skipif(hasattr(escape, 'func_code'),
- reason='this test only tests the c extension')
-class TestMarkupLeak(object):
-
- def test_markup_leaks(self):
- counts = set()
- for count in range(20):
- for item in range(1000):
- escape("foo")
- escape("<foo>")
- escape(u"foo")
- escape(u"<foo>")
- counts.add(len(gc.get_objects()))
- assert len(counts) == 1, 'ouch, c extension seems to leak objects'
-
-
@pytest.mark.utils
@pytest.mark.escapeUrlizeTarget
class TestEscapeUrlizeTarget(object):