summaryrefslogtreecommitdiff
path: root/unitTests.py
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Add unit test for named ParseResults combined with Dict-created named ↵ptmcg2018-11-131-3/+20
| | | | results in the same Group; removed reference to UnicodeTests, which subsetted the tests that were actually being run
* Added unicode sets for LatinA and LatinB rangesptmcg2018-11-091-0/+19
|
* assertRaises not compatible in Py2.6pyparsing_2.3.0ptmcg2018-10-311-9/+10
|
* Add unit test for indentedBlock expressionptmcg2018-10-301-0/+37
|
* Clean up old cruft from unit testsptmcg2018-10-301-30/+2
|
* Undefined name: file() was removed in Python 3cclauss2018-10-301-1/+1
| | | | | | | __file()__ was removed as a builtin in Python 3 so this PR advocates the use of __open()__ instead. Also note that four lines above, __testclass__ is an _undefined name_ and perhaps __testclasses__ should be used in its place. Undefined names have the potential to raise NameError at runtime.
* Add Py2 unicodeismsptmcg2018-10-271-2/+2
|
* Add unicode character ranges by nameptmcg2018-10-271-0/+14
|
* Add unit test for ParserElement.setBreak()ptmcg2018-10-271-0/+24
|
* Fix extra nesting level in ParseResults when defining results name in ↵ptmcg2018-10-121-0/+15
| | | | another non-Group named expression
* Better description of bug and fix for Issue #22ptmcg2018-10-071-1/+10
|
* Fix Issue #22, test for returning given parse results from a parse action; ↵ptmcg2018-10-071-83/+100
| | | | convert pyparsing.xxx references to pp.xxx references in unitTests.py
* Added PrecededBy class (Issue#30); updated FollowedBy to accept results ↵ptmcg2018-10-061-4/+48
| | | | names on the lookahead expression; added inline example for NotAny; added Char class
* Issue #4 - add special handling for IndexError exceptions raised in user ↵ptmcg2018-09-301-0/+22
| | | | parse actions
* tighten up error checking in Regex.sub()Paul McGuire2018-09-291-0/+27
|
* Add Regex.sub() method, and asMatch and asGroupList parametersPaul McGuire2018-09-291-0/+45
|
* Fix tab-space inconsistency wrought by misconfigured editorPaul McGuire2018-09-241-7/+7
|
* Issue #28, bug in SkipTo when skipping to an expr that saves as a listPaul McGuire2018-09-241-0/+8
|
* Stage for 2.2.1 release; add Getting Started section to module docstring; ↵ptmcg2018-09-171-1/+14
| | | | fix Literal/Keyword index error bug
* Move src to rootCengiz Kaygusuz2017-11-201-0/+3675