summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Change environment cache key constructionpgjones2016-05-211-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Change cache key definitiion in environmentpgjones2016-05-191-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Merge pull request #439 from jgmize/title-filter-capitalize-inside-parensJeff Widman2016-04-151-0/+8
| | |\ \ \ | | | | | | | | | | | | Make title filter capitalize words inside parens and other brackets
| | | * | | Make title filter capitalize words in (),{},[],<>Josh Mize2015-04-081-0/+8
| | | | | |
| | * | | | Merge branch '2.8-maintenance'Markus Unterwaditzer2016-04-121-3/+8
| | |\ \ \ \ | | | | |_|/ | | | |/| |
| | | * | | Fixed int() filter for non-string objects #466Sebastian Noack2016-04-121-3/+8
| | | | |/ | | | |/|
| | * | | standard tox/travis configDavid Lord2016-04-111-4/+4
| | | | | | | | | | | | | | | | | | | | fix pytest warning, don't prefix non-testcase classes with Test
| | * | | Escape target attribute in the urlize function in utils.py. (#507)Sambhav Satija2016-04-101-1/+12
| | |/ /
| * | | Prevent random filter from being inlinedSebastian Noack2015-08-101-1/+8
| |/ /
* | | Added unique filterSebastian Noack2015-08-101-7/+21
|/ /
* | Add 'base' parameter to 'int' filterBen Timms2015-04-291-2/+3
|/
* Let the Environment override the ContextThiefMaster2015-04-061-0/+13
| | | | closes #404
* Let the Environment override the CodeGeneratorThiefMaster2015-04-061-0/+22
| | | | see #404
* Rename testsuite to tests and suggestionsKartheek Lenkala2015-03-2220-0/+3685
| | | | | Remove py.test from setup.py install_requires Rename testsuite folder to tests.
* Removed old testsuite.Armin Ronacher2010-02-0927-2739/+0
| | | | | --HG-- branch : trunk
* PrefixLoader raises correct error message now. This fixes #358.Armin Ronacher2010-02-091-1/+14
| | | | | --HG-- branch : trunk
* added with-statement extension.Armin Ronacher2010-02-071-0/+12
| | | | | --HG-- branch : trunk
* Improved test invokation. Picks up doctests within Jinja now, changedArmin Ronacher2010-02-072-4/+5
| | | | | | | | 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
* Further error message improvement, this time for #341.Armin Ronacher2010-02-071-0/+3
| | | | | --HG-- branch : trunk
* Fixed bug in a testcase.Armin Ronacher2010-02-071-2/+0
| | | | | --HG-- branch : trunk
* Added a testcase for #363. This bug was fixed along the way.Armin Ronacher2010-02-061-0/+30
| | | | | --HG-- branch : trunk
* added support for translator comments if extracted via babel.Armin Ronacher2010-02-061-0/+17
| | | | | --HG-- branch : trunk
* implicit tuple expressions can no longer be totally empty.Armin Ronacher2010-02-061-0/+6
| | | | | | | | This change makes ``{% if %}...{% endif %}`` a syntax error now. (#364) --HG-- branch : trunk
* greatly improved error message reporting. This fixes #339Armin Ronacher2010-02-061-1/+28
| | | | | | --HG-- branch : trunk extra : rebase_source : d8f677273490fa73d5603b68478fa3b54f60ccb9
* fixed a problem with having call blocks in outer scopes thatArmin Ronacher2010-01-141-1/+34
| | | | | | | | have an argument that is also used as local variable in an inner frame [#360]. --HG-- branch : trunk
* Just to be on the sure side with that compiler optimization magicArmin Ronacher2010-01-141-0/+6
| | | | | --HG-- branch : trunk
* Fixed the choice include tests.Armin Ronacher2010-01-141-0/+11
| | | | | --HG-- branch : trunk
* include tags are now able to select between multiple templatesArmin Ronacher2010-01-142-1/+38
| | | | | | | | and take the first that exists, if a list of templates is given. --HG-- branch : trunk
* Reverted [73b04625ab54]. The old behavior is the new behavior, the otherArmin Ronacher2009-10-261-12/+0
| | | | | | | is not consistenly implementable. --HG-- branch : trunk
* Fixed a scoping bug that was introduced in the development version and wasArmin Ronacher2009-10-251-0/+25
| | | | | | | | triggered by multiple layers of local variables not tracked properly in if statements. --HG-- branch : trunk
* added a deprecation warning for a variable assignment, scope bugArmin Ronacher2009-09-181-0/+13
| | | | | | | | | | 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
* fixes issue with code generator that causes unbound variablesArmin Ronacher2009-09-171-0/+6
| | | | | | | to be generated if set was used in if-blocks. --HG-- branch : trunk
* fixes some smaller problems for Jinja2 on Jython.2.2.1Armin Ronacher2009-09-143-8/+13
| | | | | --HG-- branch : trunk
* Added ugly workaround for a loop bug.Armin Ronacher2009-09-121-1/+1
| | | | | --HG-- branch : trunk
* Added unittests for meta.Armin Ronacher2009-07-261-0/+38
| | | | | --HG-- branch : trunk
* Got rid of py.testisms.Armin Ronacher2009-07-2620-408/+210
| | | | | --HG-- branch : trunk
* Support nose framework for the whole test suite.Rene Leonhardt2009-04-2020-31/+135
| | | | | --HG-- branch : trunk
* Added a testcase for the last change.Armin Ronacher2009-04-011-1/+2
| | | | | --HG-- branch : trunk
* Fixed another bug with line commentsArmin Ronacher2009-04-011-2/+2
| | | | | --HG-- branch : trunk
* Fixed bug in line-based comments with priority.Armin Ronacher2009-03-311-3/+15
| | | | | --HG-- branch : trunk
* Added support for line-based comments.Armin Ronacher2009-03-302-1/+33
| | | | | --HG-- branch : trunk
* Added testcase for #335Armin Ronacher2009-03-301-1/+8
| | | | | --HG-- branch : trunk
* Added testcase for a bugArmin Ronacher2009-03-181-0/+20
| | | | | --HG-- branch : trunk
* Improved Jinja's debugging support by introducing "@internalcode" which ↵Armin Ronacher2009-02-241-1/+13
| | | | | | | marks code objects that are skipped on tracebacks. Also template errors are now translated as well to help the pylons debugger. --HG-- branch : trunk
* Added proper super() support for scoped blocks.Armin Ronacher2009-02-191-0/+9
| | | | | --HG-- branch : trunk
* Added support for optional `scoped` modifier to blocks.Armin Ronacher2009-02-191-0/+9
| | | | | --HG-- branch : trunk
* Fixed a bug that caused internal errors if names where used as iterationArmin Ronacher2009-02-113-0/+103
| | | | | | | | variable and regular variable *after* the loop if that variable was unused *before* the loop. (#331) --HG-- branch : trunk
* Made it possible to refer to names from outer scopes in included templatesArmin Ronacher2009-02-081-1/+15
| | | | | | | that were unused in the callers frame (#327). --HG-- branch : trunk
* Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.Armin Ronacher2009-02-051-0/+8
| | | | | --HG-- branch : trunk
* Fixed a bug that caused syntax errors when defining macros or using theArmin Ronacher2009-02-041-0/+15
| | | | | | | | | `{% call %}` tag inside loops. This fixes #323. --HG-- branch : trunk