summaryrefslogtreecommitdiff
path: root/unitTests.py
Commit message (Collapse)AuthorAgeFilesLines
* Selected backports from 3.0.0 workptmcg2020-03-061-8/+44
|
* Run all the testspyparsing_2.4.6Paul McGuire2019-12-231-1/+0
|
* Fix left-assoc ternary operator in infixNotation; fix White \u string typos; ↵Paul McGuire2019-12-231-3/+26
| | | | backport pyparsing_test from 3.0
* Clean up DeprecationWarnings and Py2 compat warningsPaul McGuire2019-11-051-6/+8
|
* Unresolved symbol reference in 2.4.3 release was masked by stdout buffering ↵Paul McGuire2019-11-051-0/+17
| | | | in unit tests
* Backport changes from 3.0.0 to fix PrecededBy bug (Issue #127)Paul McGuire2019-10-131-0/+15
|
* Manually merge 2.4.2 changes from master back to 2.4.x branchPaul McGuire2019-08-021-2/+78
|
* Fix latent bug if adding a parse action after having cleared parse actions ↵pyparsing_2.4.1Paul McGuire2019-07-201-0/+4
| | | | with None
* Cleaned up CHANGES to accurately describe the pre/post 2.3.0 bugfix ↵Paul McGuire2019-07-091-1/+97
| | | | behavior; added file argument to runTests; added conditionAsParseAction helper
* sys.write does not take keyword argsPaul McGuire2019-07-081-2/+2
|
* Add __diag__ namespace to enable diagnostic switches; add asKeyword optional ↵Paul McGuire2019-07-081-6/+41
| | | | arg for oneOf to emit Keyword expressions instead of Literals
* Some code cleanup in unitTests.pyPaul McGuire2019-07-071-109/+177
|
* Run *all* the unit tests!Paul McGuire2019-07-061-1/+0
|
* Add support for multiple '...' skips in a single expression; `_skippped` ↵Paul McGuire2019-07-061-13/+25
| | | | results name will always return a list of skipped items
* Cleanup unit tests for SkipTo expressions, especially using '...'Paul McGuire2019-07-051-31/+47
|
* Add support for "(expr | ...)" as a form of "on-error, skip" notationptmcg2019-07-051-3/+16
|
* Further mods to `Forward.__str__` to possibly address memory issues reported ↵ptmcg2019-07-051-1/+2
| | | | in #85 and #91, and also does not stomp on user-defined expression names
* Fix numeric unit tests to be Py2-friendlyptmcg2019-07-041-29/+47
|
* Wrap expressions using ... in unitTests.py with eval() so that Py2 won't ↵Paul McGuire2019-07-041-7/+8
| | | | complain about syntax
* Add support for ... as short cut for SkipTo in And, and for repetition as ↵Paul McGuire2019-07-031-3/+43
| | | | OneOrMore and ZeroOrMore; fix PY2 test bug in unitTests.py
* Issue #93 - interaction of Or and addCondition sometimes selects alternative ↵Paul McGuire2019-07-021-1/+17
| | | | that is not the longest
* Fix up changes to parse reals without leading digits before the decimal, and ↵Paul McGuire2019-06-291-0/+87
| | | | add unit tests
* Add support for expr.setParseAction(None) to clear all parse actionsPaul McGuire2019-06-291-0/+14
|
* Fix issue #87, regression in indentedBlockPaul McGuire2019-06-291-3/+120
|
* Improved support for "python setup.py test"Paul McGuire2019-04-071-1/+5
|
* Fixed dict structure in makeHTMLTags expressions, and added tag_body ↵Paul McGuire2019-04-061-14/+27
| | | | attribute to the generated start expression giving easy access to a SkipTo(closeTag) that will parse the tag's body text; some code cleanup and removed duplication among examples
* Fix tests for Py2 when using explainPaul McGuire2019-04-021-0/+24
|
* Remove disabling of tests for Py2 when using explainPaul McGuire2019-04-011-8/+0
|
* General code cleanup; have unit test module exit(0 or 1) depending on test ↵Paul McGuire2019-04-011-3/+5
| | | | success, to trigger CI pass/fail; fix bug that crept into withAttribute; minor performance tweaks in Regex and Word
* Merge remote-tracking branch 'origin/master'Paul McGuire2019-03-301-3/+84
|\ | | | | | | | | # Conflicts: # pyparsing.py
| * Fix cases where an indentedBlock partially parsing will cause all other ↵TMiguelT2019-03-121-0/+76
| | | | | | | | | | | | | | correct indentedBlocks to fail (#75) * Add failing test for indentedBlock * Simplify fix by storing a backup stack
| * Descriptive names for Forward expressions (#71)Eric Wald2019-03-101-3/+8
| | | | | | Resolves the infinite recursion potential by setting a temporary name during resolution.
* | Add __compat__.collect_all_And_tokens to address version incompatibility, ↵Paul McGuire2019-03-301-0/+29
|/ | | | and conditionalize API-breaking behavior (#69)
* Update examples and unit tests to more preferred coding styles, imports for ↵ptmcg2019-01-301-30/+29
| | | | pyparsing_common as ppc and pyparsing_unicode as ppu
* Disable explain() tests if running in Py2ptmcg2019-01-091-0/+8
|
* Add enumerated place holders for strings that invoke str.format(), for Py2 ↵ptmcg2019-01-091-10/+12
| | | | compatibility
* Unit test to test fix for issue #65ptmcg2019-01-071-0/+14
|
* Add experimental ParseException.explain() method, to return a multiline ↵Paul McGuire2019-01-051-4142/+4181
| | | | string showing the parse expressions leading to a parsing failure
* Remove print() call left in to test decoyPaul McGuire2018-12-301-1/+1
|
* Cleanup unit tests for better Py2 compatibility and current pyparsing usage: ↵Paul McGuire2018-12-301-83/+100
| | | | prefix string literals containing unicode with 'u'; replace all 'setResultsName' calls to use (name) form; replace all calls to builtin print() with Py2-3 compatible print_(), and add decoy print() method to catch incorrect calls
* Fix matching of dictOf with empty contents (Issue #53)ptmcg2018-12-281-0/+19
|
* Fix partial named results when And embedded in named MatchFirst or Orptmcg2018-12-281-0/+25
|
* Replace bare 'except:' with 'except Exception;'Jon Dufresne2018-12-241-4/+4
| | | | | | | | | | | | | Catching all exceptions is generally considered a bad practice under most circumstances as it will also catch KeyboardInterrupt and SystemExit. These special cases should be raised to the interpreter to allow the Python process to exit. This fix complies with pycodestyle's error code E722: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes > do not use bare except, specify exception instead
* Remove unused imports throughout projectJon Dufresne2018-12-241-13/+10
| | | | | | | | | | | | | Unused imports were discovered using flake8. By removing the unused imports, the code is a bit friendlier to new contributors as it is clearer what is being used and not simply leftover from previous refactoring. The flake8 command: $ flake8 . --select F401 http://flake8.pycqa.org/
* Trim trailing white space throughout the projectJon Dufresne2018-12-221-223/+223
| | | | | | Many editors clean up trailing white space on save. By removing it all in one go, it helps keep future diffs cleaner by avoiding spurious white space changes on unrelated lines.
* Fix encoding cookie to use encoding "utf-8"Jon Dufresne2018-12-221-1/+1
| | | | | | | | | | | | | | | The all caps "UTF-8" causes warnings or errors in some editors. "utf-8" is more widely recognized. For example, when opening files in Emacs, I see: > Warning (mule): Invalid coding system ‘UTF-8’ is specified > for the current buffer/file by the :coding tag. > It is highly recommended to fix it before writing to a file. > Really proceed with writing? (yes or no) I'm then promped before saving. The CPython source code uses the lowecase form.
* Fix postParse bug introduced in runTests; extended cleanup of unitTests ↵Paul McGuire2018-12-211-439/+515
| | | | (convert bare asserts to TestCase.assertTrue and assertEqual; remove trailing spaces throughout)
* Add support for optional postParse argument to ParserElement.runTestsPaul McGuire2018-12-211-1/+17
|
* Intern unicode range strings to prevent their listing in generated docs ↵ptmcg2018-11-221-3/+32
| | | | (pyparsing #50); fixed bug in composition of unicode_sets using multiple inheritance
* Add support for combining unicode_sets using multiple inheritancePaul McGuire2018-11-171-2/+6
|