summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* update dependenciesDavid Lord2022-12-291-2/+4
|
* normpath on final template filenameDavid Lord2022-03-251-4/+12
|
* use `posixpath.join` when loading template namesDavid Lord2022-03-151-3/+4
|
* add case_sensitive parameter groupby filterDavid Lord2022-03-082-0/+39
| | | | Co-authored-by: Yuri Sukhov <yuri.sukhov@gmail.com>
* add parens around auto_await for filters and callsDavid Lord2022-03-071-0/+16
|
* add items filterArmin Ronacher2022-03-071-0/+11
|
* async_variant filters are pickleableJeff Dairiki2022-03-071-0/+6
|
* specify context for translation blockDavid Lord2021-12-261-1/+13
|
* support native types in macrosMartin Krizek2021-11-101-0/+7
|
* remove deprecated legacy resolve mode for context subclassDavid Lord2021-11-101-17/+0
|
* Merge branch '3.0.x'David Lord2021-11-094-2/+33
|\
| * PackageLoader works with single module fileDavid Lord2021-11-091-0/+22
| |
| * Merge pull request #1509 from kianmeng/fix-typosDavid Lord2021-11-091-2/+2
| |\ | | | | | | Fix typos
| | * Fix typosKian-Meng, Ang2021-10-121-2/+2
| | |
| * | Use object.__hash__ for Node.__hash__Kristian Klette2021-11-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression in commit 60293416db69782fd048a7820667afa4ae7c423b that changed the `__hash__` implementation of Node from the default pointer hash, to a hash based on the node fields. Since these fields contains list objects, they are not hashable, making every call to `Node.__hash__` fail. This breaks some third-party usage such as in `django-compressor` (See: https://github.com/django-compressor/django-compressor/issues/1060) This changed reverts the hash method back to using `object.__hash__` as the hash implementation.
| * | native: keep same behavior on Python 3.10Martin Krizek2021-11-091-0/+6
| | |
* | | drop Python 3.6David Lord2021-11-082-44/+14
| | |
* | | Merge branch '3.0.x'David Lord2021-11-051-3/+6
|\ \ \ | |/ /
| * | Tests: Adapt expected traceback regexes for Python 3.11.0a1Miro Hrončok2021-11-051-3/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/pallets/jinja/issues/1526 Before: File ".../broken.html", line 2, in <module> {{ fail() }} File ".../test_debug.py", line 32, in <lambda> tmpl.render(fail=lambda: 1 / 0) ZeroDivisionError: division by zero After: File ".../broken.html", line 2, in <module> {{ fail() }} ^^^^^^^^^^^^ File ".../test_debug.py", line 32, in <lambda> tmpl.render(fail=lambda: 1 / 0) ~~^~~ ZeroDivisionError: division by zero
* | Tests: Make "Traceback did not match" an actual f-stringMiro Hrončok2021-11-021-1/+1
|/ | | | | | | | | | | | | Otherwise the failure looks like this: > assert ( m is not None ), "Traceback did not match:\n\n{''.join(tb)}\nexpected:\n{expected_tb}" E AssertionError: Traceback did not match: E E {''.join(tb)} E expected: E {expected_tb} E assert None is not None
* omit curdir from PackageLoader root pathDavid Lord2021-10-041-0/+11
| | | | | | fixes compatibility with zip imports Co-authored-by: kuepe-sl <peter_kueffner@web.de>
* imported macros can access template globals in async modeDaniel Stone2021-10-042-31/+36
|
* Fixes #1448: Revert Undefined.__contains__ to 2.x behaviourJoachim Jablon2021-08-091-1/+2
|
* make compile_templates deterministicTakuto Ikuta2021-08-091-0/+28
| | | | | Python3 doesn't keep insertion order for set(), so this sorts some places for deterministic output for compiled template.
* clear assignments in loops at end of iterationAmy2021-05-211-0/+7
|
* use asyncio.runDavid Lord2021-05-181-3/+12
|
* Use pathlib in some test placesDanny Sepler2021-05-184-46/+27
|
* rename default branch in filesDavid Lord2021-05-112-44/+47
|
* add type annotationsDavid Lord2021-05-081-1/+1
|
* deprecate legacy resolve modeDavid Lord2021-04-111-5/+7
|
* async support doesn't require patchinginline-asyncDavid Lord2021-04-103-10/+3
|
* Markup and escape should be imported from markupsafeDavid Lord2021-04-105-5/+5
|
* unify/rename filter and function decoratorsDavid Lord2021-04-104-26/+24
| | | | Use pass_context instead of contextfilter and contextfunction, etc.
* add default parameter to groupbylisongmin2021-04-051-0/+15
|
* Split lines in lexer only by \r\n, \r and \nMatěj Volf2021-04-051-0/+7
| | | | | | | | | | | | Python str.splitlines() splits by more characters[1], which, however, causes problems when keeping these special characters in processed templates is desirable, i.e. these bug reports: #769, #952, #1313. The keep_trailing_newlines logic is reworked because splitlines() removes them already (so they had to be added), while re.split doesn't so they have to be removed. [1] https://docs.python.org/3/library/stdtypes.html#str.splitlines
* NativeEnvironment supports async moderemidebette2021-04-051-0/+24
|
* add Undefined.__aiter__Jafnee2021-04-051-0/+14
|
* Undefined.__contains__ raises UndefinedErrorDavid Parker2021-04-051-0/+1
|
* parse hex, octal, and binary integer literalsAlex Mykyta2021-04-051-0/+7
|
* filters.py: do_indent: ident filter can indent with arbitrary charactersLars Kollstedt2021-04-051-0/+4
| | | | | | | | | | | Allow indention with generic characters, e.g. Tabs. Implemenented the behavior requested in https://github.com/pallets/jinja/pull/1167#issuecomment-612644701 The width param can be string or int, if it is string it's the raw indention e.g. "\t". If it's int it's the number of spaces. In other cases an FilterArgumentError is raised, to avoid confusion.
* add pgettext and npgettextSardorbek Imomaliev2021-04-051-8/+81
|
* add 'is filter' and 'is test' testsDavid Lord2021-04-042-6/+31
| | | | | | This required allowing tests to be decorated with '@environmentfilter'. Tests are essentially the same as filters now, the node, compiler, and environment have been refactored to extract common behavior.
* allow optional use of filter based on existenceAmy2021-04-041-0/+48
|
* more detailed docs about globalsDavid Lord2021-03-311-22/+17
|
* fix bug with cached templates not using new globalsAmy2021-03-301-0/+34
|
* track local loop/block vars for contextfunctionsAmy2021-03-261-0/+98
|
* map filter can use False as defaultBALaka-182021-02-241-0/+8
|
* fix new formatting issuesDavid Lord2021-01-303-4/+4
|
* update urlize docs, clean up codeDavid Lord2021-01-301-2/+2
| | | | | | move regexes near implementation commented verbose regex for http pattern renamed extra_uri_schemes to extra_schemes
* Improve and extend urlizeBebleo2021-01-302-0/+32
|