summaryrefslogtreecommitdiff
path: root/src/lxml/tests
Commit message (Collapse)AuthorAgeFilesLines
* Prevent lxml.objectify from accepting non-decimal digit characters as ↵Stefan Behnel2023-03-031-0/+1
| | | | integers/numbers and from representing them as IntElement.
* Work around libxml2 bug in affected versions that failed to reset the ↵Stefan Behnel2022-07-191-2/+1
| | | | | | namespace count in the parser context. See https://gitlab.gnome.org/GNOME/libxml2/-/issues/378
* LP#1981760: Register "Element.attrib" as collections.abc.MutableMapping.Stefan Behnel2022-07-151-0/+12
|
* Prevent parse failure in new test from leaking into later test runs.lxml-4.9.1Stefan Behnel2022-07-011-2/+4
|
* Fix a crash when incorrect parser input occurs together with usages of ↵Stefan Behnel2022-07-011-0/+20
| | | | iterwalk() on trees generated by the same parser.
* Remove debug print from test.Stefan Behnel2022-05-311-2/+0
|
* Add a test for https://bugs.launchpad.net/lxml/+bug/1965070 leaving out the ↵Stefan Behnel2022-05-301-0/+25
| | | | actual failure case.
* Allow QName as tag value in ElementMaker, not just strings.Stefan Behnel2022-02-141-1/+18
|
* Use expected XSD spellings for xsi:double infinity and NaN (GH-338)Tobias Deiminger2022-02-131-0/+9
| | | | | | | | | | | | | W3C specification for xsd:double says > The special values positive and negative infinity and > not-a-number have lexical representations INF, -INF and NaN, > respectively. Thus case matters. The previously used float.__repr__ would generate "inf", "-inf", "nan". Now we prepend special handling to get "INF", "-INF", "NaN" instead (which is still pytype compatible). Includes minor non-functional alignments of related bool to text code, and tests to assert its XML schema conformance as well.
* Allow Path-like objects for file arguments (GH-337)Henning Janssen2022-02-125-3/+84
| | | Use "PyOS_FSPath()" if available (Py3.6+). Otherwise, manually check for "__fspath__", in case an object defines it.
* Add a test to get at least minimal coverage for the lxml.html.builder module.Stefan Behnel2021-12-131-0/+8
|
* Fix condition in test decorator.Stefan Behnel2021-12-101-1/+1
|
* Exclude a test when using the macOS system libraries because it fails with ↵Stefan Behnel2021-12-103-3/+12
| | | | libxml2 2.9.4.
* Add test for Python3 regression in C14N2 serialization (GH-332)khillman2021-11-211-0/+39
| | | | | Details in https://mail.python.org/archives/list/lxml@python.org/thread/6ZFBHFOVHOS5GFDOAMPCT6HM5HZPWQ4Q/ Fixed in https://github.com/lxml/lxml/commit/8a9579c32782f3d59b73bcf3e7d2fb3b52b80956
* Implement a dedicated int/float parser for XML (schema) values in ↵Stefan Behnel2021-08-141-7/+62
| | | | | | | | | lxml.objectify. This disables support for "_" in numbers, which are allowed by Python but not by XMLSchema. We keep a few additional literals, such as "+NaN", simply because they shouldn't hurt. See https://mail.python.org/archives/list/lxml@python.org/thread/6F7VIDKWZTJ6LB6VOX6IJNNWICYHFPNR/
* Rewrite Unicode chunk parsing by directly encoding to UTF-8.Stefan Behnel2021-07-181-6/+55
| | | | Previously, we required Py_UNICODE strings, which is inefficient since most strings in Py3 use the PEP-393 memory layout.
* Adapt a test to a behavioural change in libxml2 2.9.11+.Stefan Behnel2021-05-191-1/+4
|
* Clean up fuzzer test.Stefan Behnel2021-05-081-1/+3
|
* Add initial Atheris fuzzer. (GH-313)DavidKorczynski2021-05-081-0/+23
|
* Enable access to the system_url of DTD entity declarations (GH-317)Joel2021-05-081-0/+8
|
* Exclude a test in Py 3.9.0 due to ET bug https://bugs.python.org/issue41900Stefan Behnel2020-10-151-0/+12
|
* Disable test in unfixed ET versions <= 3.8.6.Stefan Behnel2020-10-011-0/+4
|
* LP#1869455: C14N 2.0 serialisation failed for unprefixed attributes when a ↵Stefan Behnel2020-10-011-0/+8
| | | | default namespace was defined.
* Remove dead imports.Stefan Behnel2020-08-132-2/+2
|
* Remove dead code.Stefan Behnel2020-08-131-9/+0
|
* Disable gc.collect() calls after each test run since there haven't been ↵Stefan Behnel2020-08-131-1/+10
| | | | proxy crashes for a very long time now and it considerably slows down the test runs (~factor 6).
* Remove dead code.Stefan Behnel2020-08-131-1/+1
|
* Use sphinx-apidoc to create API reference (GH-309)Chris Mayo2020-08-041-1/+3
| | | | | | | | | | | | | * Add some missing files to .gitignore * Remove duplicate open_in_browser from lxml.html.__all__ * Make ETreeXMLSchemaTestCase docstring Sphinx autodoc friendly * Fix outdated codespeak.net links in docstrings * Convert html/defs.py comment to be the module docstring * Use sphinx-apidoc to create the API reference instead of epydoc Epydoc is Python 2 only and unmaintained. sphinx-apidoc is run before the build step, to avoid duplicate entries being created. * Include the elements from html.builder in the API reference * Use Python 3.8 for coverage Travis job * Build html documentation in Travis
* Extend C14N2 tests to cover comment handling and "strip_text" together.Stefan Behnel2020-06-141-16/+21
|
* Fix a test after moving it to a different test module.Stefan Behnel2020-05-261-2/+2
|
* Move some ElementTree compatibility tests over to the etree-only tests since ↵Stefan Behnel2020-05-262-248/+252
| | | | the features were removed in Py3.9.
* Make iter() work with qnames (GH-298)xmo-odoo2020-03-031-0/+24
| | | | | "QName" is supposed to be usable anywhere a tag name is expected and iter() should take any number of tag names for filtering, but before this change passing a QName to iter() results in an exception.
* LP#1857794: Tail text of nodes that get removed from a document using item ↵Stefan Behnel2020-01-021-0/+28
| | | | deletion disappeared silently instead of sticking with the node that was removed.
* Merge lxml-4.4 branch into master.Stefan Behnel2019-12-271-0/+11
|\
| * LP#1844674: Include tail text of comments and PIs in itertext() results ↵Stefan Behnel2019-12-271-0/+11
| | | | | | | | (regression in lxml 4.4).
| * Fix false detection of recursive include (GH-286)RainerHausdorf2019-08-181-0/+54
| | | | | | | | | | | | | | | | | | | | Fix false detection of recursive include. In some cases ElementInclude does raise FatalIncludeError because of recursive include detection. This is the case if the same file gets included multiple times, but not recursive. This is a fix for https://bugs.launchpad.net/lxml/+bug/1835708
* | Clean up imports in tests.Stefan Behnel2019-12-2723-135/+93
| |
* | Fix some typos in comments (found by codespell) (GH-292)Stefan Weil2019-11-132-3/+3
| | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* | Extend HTML tests a little to include tag matching.Stefan Behnel2019-09-281-3/+19
| |
* | Fix false detection of recursive include (GH-286)RainerHausdorf2019-08-181-0/+54
| | | | | | | | | | | | | | | | | | Fix false detection of recursive include. In some cases ElementInclude does raise FatalIncludeError because of recursive include detection. This is the case if the same file gets included multiple times, but not recursive. This is a fix for https://bugs.launchpad.net/lxml/+bug/1835708
* | Validate "level" argument in indent() function.Stefan Behnel2019-08-151-0/+11
| |
* | Implement indent() function for in-place pretty-printing of XML trees.Stefan Behnel2019-08-131-0/+119
|/
* LP#1838252: Keep the order provided by an OrderedDict that gets passed as ↵Stefan Behnel2019-07-291-14/+27
| | | | attrib mapping during element creation. This was broken in 4.4.0.
* Update TreeBuilder tests from CPython's test suite.Stefan Behnel2019-07-271-0/+114
|
* Fix typos (GH-282)Min ho Kim2019-06-241-2/+2
|
* Prevent the default namespace from being picked up when searching for ↵Stefan Behnel2019-05-081-0/+59
| | | | | | unprefixed attribute names. Fix copied from https://github.com/python/cpython/pull/13201
* LP#1827833: Fix .rnc parsing support with recent versions of rnc2rng.Stefan Behnel2019-05-061-4/+9
|
* Support parsing from file paths in canonicalize(), not just file-like objects.Stefan Behnel2019-04-291-10/+12
|
* Change canonicalize() interface to return its result as a text string by ↵Stefan Behnel2019-04-291-6/+2
| | | | default.
* Extend tests.Stefan Behnel2019-04-291-0/+20
|