summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Better formatting in range_check.py example, and added to test_examples.pyHEADmasterptmcg2023-05-061-0/+3
|
* Updated several examples to latest method namesptmcg2023-05-041-1/+1
|
* Add test case for PR #479ptmcg2023-04-181-0/+96
|
* Fix regex matching for Python quoted stringsptmcg2023-04-181-0/+34
|
* Blackenptmcg2023-04-031-102/+103
|
* Fix #474 - redo QuotedString '\' escape handling as a state machine so that ↵ptmcg2023-03-281-0/+57
| | | | all transforms are done left to right
* Add 'url' named capture group to common.url Regex - update unit tests tooptmcg2023-03-271-0/+1
|
* Fix #470 - Removed "" from the list of values that ParseResults will not ↵ptmcg2023-03-271-0/+59
| | | | save with a results name
* Fix #475 - SkipTo used incorrect storage of ignore expressions, would match ↵ptmcg2023-03-261-0/+17
| | | | the target expression if present within an ignorable
* Update lucene_grammar.py example, fix * and ? wildcards, and corrected some ↵ptmcg2023-03-251-2/+2
| | | | tests. Addresses #455
* Fix testing typoptmcg2023-03-071-1/+1
|
* Fix detection of debugging to suppress creation of tmpXXXX.html files during ↵ptmcg2023-03-071-12/+47
| | | | railroad diagram tests
* Add ParseResults.deepcopy() - fixes #463ptmcg2023-03-061-0/+114
|
* Remove ^ and $ tags from pp.common.url regex - fixes #459ptmcg2023-01-181-5/+3
|
* Remove ^ and $ tags from pp.common.url regex - fixes #459ptmcg2023-01-181-0/+18
|
* Add pyparsing.unicode.identifier class propertyptmcg2023-01-131-52/+65
|
* Debugging railroad diagram testsptmcg2022-11-111-1/+4
|
* Debugging railroad diagram testsptmcg2022-11-111-2/+6
|
* Refactor tests creating diagrams of selected examplesptmcg2022-11-111-30/+16
|
* Add docs that `expr * ...` is a valid alternative to `ZeroOrMore(expr)` ↵ptmcg2022-11-061-0/+2
| | | | (Issue #445)
* Deprecate ParserElement.validate() (Issue #444)ptmcg2022-11-061-1/+2
|
* Fix stacklevel when warning invalid config setting; added assertWarns ↵ptmcg2022-11-061-1/+17
| | | | wrapper similar to assertRaises wrapper, to echo success/fail status
* Add delta_time, excelExpr, and rosettacode to test_examples.pyptmcg2022-07-121-1/+10
|
* Add recurse option to set_debug(), fixes #399ptmcg2022-07-111-0/+44
|
* Merge branch 'ptm_address_booleansearchparser_issue'ptmcg2022-07-091-0/+87
|\ | | | | | | | | | | | | | | # Conflicts: # examples/booleansearchparser.py # pyparsing/__init__.py # tests/test_examples.py # tests/test_unit.py
| * Fix delimited_list bug (Issue #408)ptmcg2022-07-091-1/+107
| |
| * Add booleansearchparser.py to test_examples for inclusion in pytest runsptmcg2022-07-091-0/+3
| |
* | Add booleansearchparser.py to test_examplesptmcg2022-07-091-0/+3
| |
* | Fix bug in delimited_list (premature streamline), issue #408ptmcg2022-07-091-1/+21
|/
* Add return of NotImplemented to other binary operators (similar to PR #425), ↵ptmcg2022-07-041-175/+234
| | | | and add unit tests
* Added python_quoted_string; fixed exception messages for ParseElementEnhance ↵ptmcg2022-06-292-107/+152
| | | | subclasses
* Update test_diagram.py testing with and without embedptmcg2022-06-241-6/+6
|
* Update diagram tests to reflect changes in jinja2ptmcg2022-06-243-2/+4
|
* Remove assignment to __class__ in Word, remove internal _WordRegex classptmcg2022-06-241-2/+10
|
* Use Literal.__new__ to select optimized subclasses (#413)Devin J. Pohly2022-06-161-5/+10
| | | | | | | | | | | | | | | | | | | * Use Literal.__new__ to select optimized subclasses This turns Literal() into a factory which creates an object of the appropriate type from the start, rather than having to overwrite the __class__ attribute later. * Fix Literal.__copy__() Instance attributes from superclasses weren't being transferred to the copy. Regression test included. * Make Empty a subclass of Literal This unifies the logic with other optimized literal classes like _SingleCharLiteral, and it seemed right in terms of a type relationship. * Style
* Fix up docstrings for deprecated functions (doc as deprecated, instead of ↵ptmcg2022-06-161-2/+2
| | | | duplicating actual function doc) - issue #411
* Fix Word(max=2) (issue #409); create re for Word(exact=n) exprs; validate ↵ptmcg2022-06-101-0/+52
| | | | that min <= max if both given
* Convert most str.format() calls in tests to use f-stringsptmcg2022-05-302-251/+105
|
* More added type annotations; reworked Word.__init__ so that excludeChars ↵ptmcg2022-05-291-0/+24
| | | | exclusion code is clearer
* Tighten up unit test calls to parseString, to pass parseAll=True except when ↵ptmcg2022-05-291-273/+330
| | | | False is explicitly required
* Fix type annotations of Forward dunder-methods (#402)Stephen Rosen2022-05-292-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix type annotations of Forward dunder-methods The `__lshift__`, `__ilshift__`, and `__or__` methods each return a ParserElement object, but have no annotated return type. The result is that the following code will not type check: def foo() -> pp.ParserElement: expr = pp.Forward() expr <<= bar() return expr | pp.Literal("baz") whereas the code will type check if the return line is changed to return pp.MatchFirst([expr, pp.Literal("baz")]) This is a bug in the types which can be resolved fairly simply with some return type annotations. Testing is more complicated. Testing annotation accuracy is a relatively novel space with a few options, none of which can be considered standard as of yet. Many solutions require learning a new toolchain only for that purpose. However, one of the lower-impact options is to use `mypy --warn-unused-ignores` to check that annotations satisfy some constraints. This isn't the most precise test possible, but it's simple and uses a widely known and familiar tool for the job. `tox -e mypy-tests` is a new tox env which calls `mypy` in the desired way. We can confirm with a new test case file that `tox -e mypy-tests` fails prior to this change to `pyparsing/` and that it passes with the change made. * Comment out mypy-test tox env for CI Until CI adjustments are made, it's not possible to add mypy-test to the tox config. It will be run under pypy where it does not work until other changes are made.
* Add embed argument to create_diagram, to suppress DOCTYPE, HEAD, and BODY tagsptmcg2022-05-203-0/+173
|
* Make expr[:ender] equivalent to expr[...:ender]ptmcg2022-05-181-9/+47
|
* Add support for slice in expr[] notation, to pass stop_on repetition sentinelptmcg2022-05-181-11/+14
|
* Fixed bug in srange (escaped chars inside range set); fixed ignore type ↵ptmcg2022-05-142-6/+22
| | | | annotation in SkipTo
* Added BMP unicode_set for the Unicode Basic Multilingual Plane (issue #392)ptmcg2022-04-281-0/+29
|
* Add tests and updated docs for changes to lpar and rpar args to ↵ptmcg2022-03-271-0/+26
| | | | infix_notation; add grouping of non-suppressed tokens with grouped contents
* Add tests and updated docs for changes to lpar and rpar args to ↵ptmcg2022-03-241-10/+127
| | | | infix_notation; add grouping of non-suppressed tokens with grouped contents
* Black and pre-commit fixesptmcg2022-02-151-54/+90
|
* Update CHANGES and timestamp from #362; fix related unit test and ValueError ↵Paul McGuire2022-02-051-2/+2
| | | | message