summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grammar.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2003-06-151-1/+1
|
* Fix for SF [ 734869 ] Lambda functions in list comprehensionsJeremy Hylton2003-05-211-0/+1
| | | | | | The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry. Bugfix candidate.
* SF #660455 : patch by NNorwitz.Guido van Rossum2003-02-121-1/+3
| | | | | | | | | | "Unsigned" (i.e., positive-looking, but really negative) hex/oct constants with a leading minus sign are once again properly negated. The micro-optimization for negated numeric constants did the wrong thing for such hex/oct constants. The patch avoids the optimization for all hex/oct constants. This needs to be backported to Python 2.2!
* Restore the hex/oct constant tests that Barry commented out for fearGuido van Rossum2002-08-291-2/+9
| | | | of FutureWarnings. Added a comment explaining the situation.
* Fixed three exceptions in the Plain integers test, although I'm notBarry Warsaw2002-08-291-3/+3
| | | | | | | | | | | sure these are the best fixes. - Test maxint-1 against the negative octal constant -020000000000 - Comment out the tests for oct -1 and hex -1, since 037777777777 and 0xffffffff raise FutureWarnings now and in Python 2.4 those constants will produce positive values, not negative values. So the existing test seems to test something that won't be true in 2.4.
* Quite down some FutureWarnings.Barry Warsaw2002-08-281-3/+3
|
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* The initial patch #468662 was not applied quite verbatim. This should oneFinn Bock2001-12-091-1/+2
| | | | | | will fix the remaining Jython issues. This closes patch "[ #490411 ] Jython and test_grammar.py".
* SF patch [ #468662 ] Allow jython to complete test_grammarJeremy Hylton2001-10-101-4/+14
| | | | | | The behavior of co_varnames in the presence of nested argument tuples is not consistent across Python and Jython. Test each platform separately.
* Test case for SF bugs #463359 and #462937, added to test_grammar for lack ofThomas Wouters2001-09-261-0/+27
| | | | | a better place. Excessively fragile code, but at least it breaks when something in this area changes!
* Make these modules work when Python is compiled without Unicode support.Guido van Rossum2001-09-211-0/+4
|
* Fix another test still expecting overflow on big int literals.Tim Peters2001-08-271-7/+2
|
* Add test for a list comprehension that is nested in the left-hand partJeremy Hylton2001-03-191-0/+5
| | | | | | | | | of another list comp. This caused crashes reported as SF bugs 409230 and 407800. Note that the new tests are in a function so that the name lookup code isn't affected by how many *other* list comprehensions are in the same scope.
* Add test case for global stmt at module level.Jeremy Hylton2001-02-281-0/+3
| | | | | Fix test_grammar so that it ignores warning about global stmt at module level in exec.
* Add simple section for assert, including assert w/ lambdasJeremy Hylton2001-02-191-0/+6
|
* Add test for syntax error on "x = 1 + 1".Jeremy Hylton2001-02-191-8/+3
| | | | Move check_syntax() function into test_support.
* update test cases for recent compiler changes: exec/import * in nestedJeremy Hylton2001-02-091-1/+0
| | | | functinos and cell vars with */** parameters
* Whitespace normalization.Tim Peters2001-02-091-1/+1
|
* Allow 'continue' inside 'try' clauseJeremy Hylton2001-02-011-0/+19
| | | | SF patch 102989 by Thomas Wouters
* Undo recent change that banned using import to bind a global, as perJeremy Hylton2001-02-011-1/+0
| | | | | | | | | | | discussion on python-dev. 'from mod import *' is still banned except at the module level. Fix value for special NOOPT entry in symtable. Initialze to 0 instead of None, so that later uses of PyInt_AS_LONG() are valid. (Bug reported by Donn Cave.) replace local REPR macros with PyObject_REPR in object.h
* add test for illegal importsJeremy Hylton2001-01-301-0/+2
|
* PEP 227 implementationJeremy Hylton2001-01-251-0/+14
| | | | | test_new: new.code() noew takes two more arguments test_grammer: Add a bunch of test cases for lambda (not really PEP 227 related)
* add extra tests to verify that co_varnames is being set up properlyJeremy Hylton2001-01-251-22/+19
| | | | | also normalize checks for syntax errors and delete commented out definition of verify.
* Add simple test of list comprehension that uses a name that isn'tJeremy Hylton2001-01-231-0/+6
| | | | | otherwise used in the same code block. (Not sure this is the right place, but there is no test_list_comprehensions.py.)
* make error msg more informative when test of exec failsJeremy Hylton2001-01-191-1/+1
|
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-10/+10
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Update the code to better reflect recommended style:Fred Drake2000-12-121-10/+10
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-90/+90
|
* Added test cases for extended printing to an instance. This picked upBarry Warsaw2000-10-111-1/+9
| | | | a bug in JPython where the instance had to have a flush() method.
* This patch adds a new Python C API called PyString_AsStringAndSize()Marc-André Lemburg2000-09-191-0/+7
| | | | | | | | | | | | | which implements the automatic conversion from Unicode to a string object using the default encoding. The new API is then put to use to have eval() and exec accept Unicode objects as code parameter. This closes bugs #110924 and #113890. As side-effect, the traditional C APIs PyString_Size() and PyString_AsString() will also accept Unicode objects as parameters.
* Added tests of "print >> None"Barry Warsaw2000-08-291-0/+25
|
* require list comprehensions to start with a for clauseSkip Montanaro2000-08-221-0/+6
|
* PEP 214, Extended print Statement, has been accepted by the BDFL.Barry Warsaw2000-08-211-0/+19
| | | | Additional test cases for the extended print form.
* list comprehensions. seeSkip Montanaro2000-08-121-0/+40
| | | | | | http://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470 for details.
* add test cases for Greg Ewing's extended call syntax patchJeremy Hylton2000-03-281-2/+33
|
* No need to define assert, it's built in.Guido van Rossum1997-04-161-2/+2
|
* avoid math, don't abort when overflow check failsGuido van Rossum1995-03-041-3/+4
|
* Fix exec test so presence of __builtins__ doesn't break itGuido van Rossum1995-01-101-0/+3
|
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-17/+103
|
* Some minute changes.Guido van Rossum1993-12-291-3/+21
|
* * test_select.py: (some) tests for built-in select moduleGuido van Rossum1993-11-111-0/+16
| | | | | | * test_grammar.py, testall.out: added test for funny things in string literals * token.py, symbol.py: definitions used with built-in parser module. * tokenize.py: added double-quote recognition
* * string.py: added rindex(), rfind(); changed index() to interpretGuido van Rossum1993-11-081-10/+13
| | | | | | | | | | | negative start indices starting from the right. * ftplib.py: debug() -> set_debuglevel(); change demo to use __init__(). * os.py: added execl, execlp, and execvp. * lambda.py: removed (now that we have built-in map, reduce, bagof, lambda) * test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce * commands.py: use os, not posix * test_grammar.py: make it easy to disable non-portable int overflow tests * dis.py: don't abuse range()
* added builtin b/w compat module.Guido van Rossum1993-10-221-1/+20
| | | | changed testing of exec.
* Added some new tests and two new files for testing: test_types.pyGuido van Rossum1992-11-271-6/+33
| | | | | (testing operations on built-in types) and autotest.py (automatic regression testing).
* '+' no longer accepted for varargs listGuido van Rossum1992-04-031-1/+1
|
* Some weird forms of try statements are no longer allowed.Guido van Rossum1992-03-311-5/+1
|
* Initial revisionGuido van Rossum1992-01-271-0/+344