summaryrefslogtreecommitdiff
path: root/test/ext
Commit message (Collapse)AuthorAgeFilesLines
* fix tests for py311Mike Bayer2022-06-291-0/+1
| | | | | | - use more specific warnings Change-Id: If1713e0f3ced05a886cd8f43862db91eba1d16de
* Fix test runs without lingua or babelMichał Górny2022-05-132-10/+20
| | | | | | | | | | Defer test imports to fall within exclusion decorators Support for identifying new 3.11-style error message Closes: #357 Pull-request: https://github.com/sqlalchemy/mako/pull/357 Pull-request-sha: 44f788b4f3a3c3e1f8328670a2334555163b90e2 Change-Id: I39d59383d92e041e10adc967f51d74839105a1eb
* Refactor test.util into mako.testingMichael Bourke2022-01-142-100/+80
| | | | | Fixes: #349 Change-Id: I202c252a913fb72cc328a6e7f0f33174802487d3
* Remove Python 2 residue; use Python 3 idiomsMichael Bourke2021-12-271-2/+2
| | | | | | Fixes #352 Change-Id: I051ec20505464559e9399a8f1ac4a39dc323902a
* Fix exception causes in lookup.pyRam Rachum2021-12-092-6/+6
| | | | | | | | | | | | | | | | | | Mako now performs exception chaining using ``raise from``, correctly identifying underlying exception conditions when it raises its own exceptions. Pull request courtesy Ram Rachum. Additionally includes cleanup of the test suite to include better exception fixtures. Closes: #319 Pull-request: https://github.com/sqlalchemy/mako/pull/319 Pull-request-sha: d06526ac3f80ca9d24cd8143d8afde254f80b094 Additionally: Fixes: #348 Change-Id: Ibb2864de822bf4b63adf22a6bb32cf0758d296bd
* update black and formatFederico Caselli2021-10-252-4/+4
| | | | | | | | Closes: #342 Pull-request: https://github.com/sqlalchemy/mako/pull/342 Pull-request-sha: 21a068103481410cf4856fb07c19146dc684d460 Change-Id: I9027433ec23ee19c9d9a47015e0327acf409e2d8
* Modernize codeworkflow_test_initial_1_2Federico Caselli2021-10-232-10/+8
| | | | | | | | | | | - remove python 2 support - add github workflows - remove disable unicode - cleanup compat file - modernize setup - use pep517 Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c
* Avoid warnings under Python 3.10Petr Viktorin2021-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | Fixed Python deprecation issues related to module importing, as well as file access within the Lingua plugin, for deprecated APIs that began to emit warnings under Python 3.10. Pull request courtesy Petr Viktorin. This modernizes the code to avoid `DeprecationWarning` and `ResourceWarning` encountered in the test suite under Python 3.10a4: - [load_module](https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module) is deprecated - Some files weren't being closed This changes the semantics of the `compat.load_module` function: on Python 3.5+, the module is no longer inserted in `sys.modules`. All non-test calls did `del sys.modules[self.module_id]` right after the call, anyway. On older Python, the module is inserted and then deleted. (Some additional `DeprecationWarning` come from Setuptools: https://github.com/pypa/setuptools/pull/2517) Closes: #328 Pull-request: https://github.com/sqlalchemy/mako/pull/328 Pull-request-sha: 87c1d09e5f39de7b19e749568c437928580f7553 Change-Id: I9cb3772f6812ef14297792344caf2f9aa5337adf
* Use tox / zimportsMike Bayer2019-05-312-77/+111
| | | | Change-Id: Ia047c7052a6d242c2cf1c7a83981f1e38ea4d928
* - still supporting py2.6 hereMike Bayer2015-10-261-2/+2
|
* Ensure babel i18n extactor works properly with non-ascii inputRoman Imankulov2015-10-131-0/+13
| | | | | | | | | | | | | | If mako templates contain something like "_('Köln')", babel extractor converts it to pure ASCII so that resulting .po file would contain "K\xf6ln". Not all translation tools and translations are ready for such kind of escape sequences. Babel allows message ids to be non-ascii, the plugin just has to return Unicode objects instead of ASCII strings (and that's exactly how Babel built-in Python and JavaScript extractors work). This fix ensures mako extractor doesn't excape non-ascii symbols, works well both for Unicode and non-unicode input (there is a test for cp1251 encoding), and also provides a workaround for babel charset detector python-babel/babel#274.
* correct template lookup on Windows:Gabi Davar2015-08-271-4/+3
| | | | | | - posixpath.join does not handle windows paths very well. Now all tests pass on py27 & py34 on windows.
* - py3k adjustments for babel/linguaMike Bayer2015-01-221-14/+16
|
* - make this import more specific, on a py3k pip uninstall of babelMike Bayer2015-01-221-1/+1
| | | | these symbols still seem to be hanging around
* - reimplement skiptests for babel or lingua not installedMike Bayer2015-01-222-33/+64
| | | | - remove nose dependency
* Use new lingua extractor APIWichert Akkerman2014-08-261-11/+35
| | | | This gives a saner way to call into lingua's Python extractor.
* Merge babel test files.Wichert Akkerman2014-08-261-1/+36
|
* Add lingua pluginWichert Akkerman2014-08-251-0/+19
|
* Split core extraction logic out of babel pluginWichert Akkerman2014-08-251-21/+0
|
* Add tests for Babel pluginWichert Akkerman2014-08-252-0/+48