aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-12-28Auto skip async tests for importsArmin Ronacher
2016-12-28Added tests for async functionality with imports and includesArmin Ronacher
2016-12-28Restore original render func for non async usageArmin Ronacher
2016-12-28Basic async support for blocksArmin Ronacher
2016-12-28Improved async testArmin Ronacher
2016-12-28Added test for macro async supportArmin Ronacher
2016-12-28Automatically await on function calls if necessaryArmin Ronacher
2016-12-28Initial support for async renderingArmin Ronacher
2016-12-28Fixed long standing wrong operator precedenceArmin Ronacher
2016-12-28Added a test for generator_stopArmin Ronacher
2016-09-24Fix and improve do_truncatejab
- Ensure that the requested max length be at least as long as the requested `end` value (e.g. 3 in the case of '...'). Fixes #539 - Add `leeway` parameter so that strings that just barely miss the requested max length cutoff can still be spared from unwanted truncation. Default value is 5. - No longer append a space before appending `end` under any circumstances. Adding whitespace before ellipsis punctuation in English is grammatically incorrect.
2016-05-21Change environment cache key constructionpgjones
Changing from a tuple of the loader ID and template name to a weakref to the loader and the template name should avoid situations whereby the loader has changed, yet the cached templates are returned. This would occur if the id of the new loader matches the old. A weakref is preferred over a direct reference so that the loader can be garbaged collected.
2016-05-19Change cache key definitiion in environmentpgjones
In 6671b973e6de5abc46829a27fd3bbb989d68ca3a the load_template method was altered to use a cache key other than the template name. The key chosen was the abs path as returned from the loader get_source method. Unless there is no path in which case the name is used. Unfortunately this introduced a performance regression, #485, as the get_source method (in the FileStoreLoader) loads the template (causing IO). The purpose of #332 was to allow the loader to change whilst ensuring the correct template was loaded, i.e. to fix this case env.loader = loader1 env.get_template('index.html') # return loader1/index.html env.loader = loader2 env.get_template('index.html') # also return loader1/index.html because of cache This commit changes the cache key to be a tuple of the id(loader) and the template name. Therefore fixing the above case without calling the get_source method and thereby avoiding the IO load. A test has been added to ensure the above case works as expected, this required a minor refactor of the caching tests.
2016-04-15Merge pull request #439 from jgmize/title-filter-capitalize-inside-parensJeff Widman
Make title filter capitalize words inside parens and other brackets
2016-04-12Merge branch '2.8-maintenance'Markus Unterwaditzer
2016-04-12Fixed int() filter for non-string objects #466Sebastian Noack
2016-04-11standard tox/travis configDavid Lord
fix pytest warning, don't prefix non-testcase classes with Test
2016-04-10Escape target attribute in the urlize function in utils.py. (#507)Sambhav Satija
2016-01-07Setting __sub__ equal to _fail_with_undefined_error so subtractions withNick Garcia
undefined variables will fail properly like other arithemtic operations.
2015-12-29Give Cycler a next() method so that it works in python2 and 3Matt Haggard
2015-04-29Add 'base' parameter to 'int' filterBen Timms
2015-04-08Make title filter capitalize words in (),{},[],<>Josh Mize
2015-04-06Let the Environment override the ContextThiefMaster
closes #404
2015-04-06Let the Environment override the CodeGeneratorThiefMaster
see #404
2015-03-22Rename testsuite to tests and suggestionsKartheek Lenkala
Remove py.test from setup.py install_requires Rename testsuite folder to tests.
2010-02-09Removed old testsuite.Armin Ronacher
--HG-- branch : trunk
2010-02-09PrefixLoader raises correct error message now. This fixes #358.Armin Ronacher
--HG-- branch : trunk
2010-02-07added with-statement extension.Armin Ronacher
--HG-- branch : trunk
2010-02-07Improved test invokation. Picks up doctests within Jinja now, changedArmin Ronacher
doctests that just show usage that would not work on their own so that they are standard code blocks now and do not disturb testing. --HG-- branch : trunk
2010-02-07Further error message improvement, this time for #341.Armin Ronacher
--HG-- branch : trunk
2010-02-07Fixed bug in a testcase.Armin Ronacher
--HG-- branch : trunk
2010-02-06Added a testcase for #363. This bug was fixed along the way.Armin Ronacher
--HG-- branch : trunk
2010-02-06added support for translator comments if extracted via babel.Armin Ronacher
--HG-- branch : trunk
2010-02-06implicit tuple expressions can no longer be totally empty.Armin Ronacher
This change makes ``{% if %}...{% endif %}`` a syntax error now. (#364) --HG-- branch : trunk
2010-02-06greatly improved error message reporting. This fixes #339Armin Ronacher
--HG-- branch : trunk extra : rebase_source : d8f677273490fa73d5603b68478fa3b54f60ccb9
2010-01-14fixed a problem with having call blocks in outer scopes thatArmin Ronacher
have an argument that is also used as local variable in an inner frame [#360]. --HG-- branch : trunk
2010-01-14Just to be on the sure side with that compiler optimization magicArmin Ronacher
--HG-- branch : trunk
2010-01-14Fixed the choice include tests.Armin Ronacher
--HG-- branch : trunk
2010-01-14include tags are now able to select between multiple templatesArmin Ronacher
and take the first that exists, if a list of templates is given. --HG-- branch : trunk
2009-10-26Reverted [73b04625ab54]. The old behavior is the new behavior, the otherArmin Ronacher
is not consistenly implementable. --HG-- branch : trunk
2009-10-25Fixed a scoping bug that was introduced in the development version and wasArmin Ronacher
triggered by multiple layers of local variables not tracked properly in if statements. --HG-- branch : trunk
2009-09-18added a deprecation warning for a variable assignment, scope bugArmin Ronacher
that exists since 2.0, code could depend on. See :ref:`jinja-scoping-bug` for more information on this problem. Tip is 2.3 as this will be the next release (will happen soon!) --HG-- branch : trunk
2009-09-17fixes issue with code generator that causes unbound variablesArmin Ronacher
to be generated if set was used in if-blocks. --HG-- branch : trunk
2009-09-14fixes some smaller problems for Jinja2 on Jython.Armin Ronacher
--HG-- branch : trunk
2009-09-12Added ugly workaround for a loop bug.Armin Ronacher
--HG-- branch : trunk
2009-07-26Added unittests for meta.Armin Ronacher
--HG-- branch : trunk
2009-07-26Got rid of py.testisms.Armin Ronacher
--HG-- branch : trunk
2009-04-20Support nose framework for the whole test suite.Rene Leonhardt
--HG-- branch : trunk
2009-04-01Added a testcase for the last change.Armin Ronacher
--HG-- branch : trunk
2009-04-01Fixed another bug with line commentsArmin Ronacher
--HG-- branch : trunk