summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Several changes for Jython portability. This closes SF patchBarry Warsaw2001-03-231-9/+18
| | | | | | | | | | | | | | | | | #403666. Specifically, In codestr, force `c' to be global. It's unclear what the semantics should be for a code object compiled at module scope, but bound and run in a function. In CPython, `c' is global (by accident?) while in Jython, `c' is local. The intent of the test clearly is to make `c' global, so let's be explicit about it. Jython also does not have a __builtins__ name in the module's namespace, so we use a more portable alternative (though I'm not sure why the test requires "__builtins__" in the g namespace). Finally, skip the new.code() test if the new module doesn't have a `code' attribute. Jython will never have this.
* Don't have trace() skip the top frame; return them all.Ka-Ping Yee2001-03-231-5/+7
|
* Convert the weakref test suite to PyUNIT, and add tests that exercise weakFred Drake2001-03-232-260/+252
| | | | references on function objects and both bound and unbound methods.
* When the regression test is run in verbose mode, make the PyUNIT-basedFred Drake2001-03-231-1/+1
| | | | tests a little noisier, providing more progress information.
* SRE 2.1b2: increase the chances that the sre test works on otherFredrik Lundh2001-03-222-14/+3
| | | | machines...
* SRE 2.1b2: forgot to update one output file (sorry, Fred!)Fredrik Lundh2001-03-221-0/+8
|
* SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicodeFredrik Lundh2001-03-221-3/+8
| | | | strings/patterns.
* sre 2.1b2 update:Fredrik Lundh2001-03-222-0/+13
| | | | | | - take locale into account for word boundary anchors (#410271) - restored 2.0's *? behaviour (#233283, #408936 and others) - speed up re.sub/re.subn
* Allow the process of reading back what we wrote to a pty to transformThomas Wouters2001-03-221-24/+36
| | | | | linefeeds into carriagereturn-linefeeds (which is apparently what IRIX does.) Also add some comments, an extra test and reorganize it a bit.
* Updated to latest PyUnit version (1.31 in PyUnit CVS); test_support.pySteve Purcell2001-03-221-10/+6
| | | | changed accordingly.
* Check that f.keys() == [] right after creation -- this prevents bugsGuido van Rossum2001-03-223-3/+6
| | | | like the one I just fixed to come back and haunt us.
* Changed doctest to run tests in alphabetic order of name.Tim Peters2001-03-212-96/+96
| | | | | | This makes verbose-mode output easier to dig thru, and removes an accidental dependence on the order of dict.items() (made visible by recent changes to dictobject.c).
* Test that traceback module works with SyntaxErrors with or without carets.Jeremy Hylton2001-03-213-0/+43
|
* Add test cases for the fnmatch module.Fred Drake2001-03-212-0/+43
|
* Just import sys at the top instead of inside lots of functions.Fred Drake2001-03-211-3/+35
| | | | Add some helpers for supporting PyUNIT-based unit testing.
* Add tests for recent changes:Jeremy Hylton2001-03-212-0/+32
| | | | | - global stmt in class does not affect free vars in methods - locals() works with free and cell vars
* Addrf simple test that import is case-sensitive.Tim Peters2001-03-211-1/+10
|
* Add test for a list comprehension that is nested in the left-hand partJeremy Hylton2001-03-192-0/+6
| | | | | | | | | 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.
* Repair test_doctest's expected-output file (Guido added some new output).Tim Peters2001-03-181-0/+2
|
* SF bug [ #409448 ] Complex division is braindeadTim Peters2001-03-182-0/+66
| | | | | | http://sourceforge.net/tracker/?func=detail&aid=409448&group_id=5470&atid=105470 Now less braindead. Also added test_complex.py, which doesn't test much, but fails without this patch.
* Whitespace normalization.Tim Peters2001-03-161-3/+2
|
* Oops. A RISCOS patch I forgot to check in.Guido van Rossum2001-03-131-1/+7
|
* Add test to verify that nested functions with free variables don'tJeremy Hylton2001-03-132-0/+24
| | | | cause the free variables to leak.
* Import the nested_scopes feature twice, to exercise the patch introducedFred Drake2001-03-101-1/+3
| | | | | | | to avoid segfaults when more than one feature is named in the future statement. This tests for regression of SF bug #407394.
* Clean up junk files left behind by imp.load_source().Tim Peters2001-03-041-1/+7
|
* Replace literal '@test' with TESTFN.Ka-Ping Yee2001-03-021-6/+6
|
* When catching errors from os.rmdir(), test for os.error, not IOError!Guido van Rossum2001-03-021-3/+3
|
* Make names in __future__.py bind to class instances instead of 2-tuples.Tim Peters2001-03-021-3/+2
| | | | Suggested on c.l.py by William Tanksley, and I like it.
* test_global was broken by some recent checkin. Repairing.Tim Peters2001-03-022-9/+15
|
* Test interaction of global and nested scopes -- thanks to Samuele Pedroni.Guido van Rossum2001-03-012-0/+66
|
* Whitespace normalization.Tim Peters2001-03-011-1/+0
|
* final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro2001-03-011-0/+16
| | | | giving it a slight facelift
* Add tests for the .copy() methods of both weak dictionary classes.Fred Drake2001-03-011-1/+15
|
* Add test case for global stmt at module level.Jeremy Hylton2001-02-283-0/+10
| | | | | Fix test_grammar so that it ignores warning about global stmt at module level in exec.
* update output to reflect exception that is now raisedJeremy Hylton2001-02-281-3/+3
|
* Fix filter for SyntaxErrorsJeremy Hylton2001-02-281-4/+4
|
* Add regression test for future statements. This adds eight files, butJeremy Hylton2001-02-2810-0/+132
| | | | | seven are not tests in their own right; these files are mentioned in regrtest.
* Whitespace normalization.Tim Peters2001-02-281-1/+0
|
* Added regression test for SF tracker bug #403871: AttributeError inFred Drake2001-02-281-0/+19
| | | | | | | | | | | | | | ZipFile.__del__() when there was an IOError opening the underlying file in ZipFile.__init__(). This is an odd test: since the exception is in the __del__() method, it is not propogated. This test will trigger it but regrtest.py does not detect the failure (not sure why); we are dependent on it actually being noticed by a user to get a new bug report if it ever fails. ;-( On the other hand, this makes sure that code gets exercised, so a failure could be noticed!
* verify that warnings are issued for bogus uses of globalJeremy Hylton2001-02-282-0/+44
|
* Patch #404680: disables the nis module and enables the dl module whenAndrew M. Kuchling2001-02-271-0/+1
| | | | | building under Cygwin. Makes some fixes to the dlmodule in order to compile with Cygwin.
* add from __future__ import nested_scopes to strings passed to compileJeremy Hylton2001-02-271-6/+12
|
* Patch #403985: Add support for weak-keyed dictionariesMartin v. Löwis2001-02-272-0/+22
|
* inspect: a module for getting information out of live Python objectsKa-Ping Yee2001-02-272-0/+208
|
* Preliminary support for future nested scopesJeremy Hylton2001-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1 __future__ feature name: "nested_scopes" symtable.h: Add st_nested_scopes slot. Define flags to track exec and import star. Lib/test/test_scope.py: requires nested scopes compile.c: Fiddle with error messages. Reverse the sense of ste_optimized flag on PySymtableEntryObjects. If it is true, there is an optimization conflict. Modify get_ref_type to respect st_nested_scopes flags. Refactor symtable_load_symbols() into several smaller functions, which use struct symbol_info to share variables. In new function symtable_update_flags(), raise an error or warning for import * or bare exec that conflicts with nested scopes. Also, modify handle for free variables to respect st_nested_scopes flag. In symtable_init() assign st_nested_scopes flag to NESTED_SCOPES_DEFAULT (defined in compile.h). Add preliminary and often incorrect implementation of symtable_check_future(). Add symtable_lookup() helper for future use.
* Make sure ConfigParser uses .optionxform() consistently; this affectsFred Drake2001-02-262-0/+25
| | | | | | .has_option(), .remove_option(), and .set(). This closes SF tracker #232913.
* Add __future__.py to std library, + dull test to verify that assignmentsTim Peters2001-02-262-0/+43
| | | | therein are of the proper form.
* Additional tests for current, PEP described semantics:Barry Warsaw2001-02-261-3/+36
| | | | | | | | | | | | - func.__dict__ is None until the first attribute is assigned - del func.__dict__ is equivalent to func.__dict__ = None - disallowing assignment to function attribute through unbound method (it was always illegal to assign through bound method). - verifying that setting attribute explicitly on underlying function via meth.im_func is okay.
* Describe -s a little more generically.Barry Warsaw2001-02-231-5/+6
|
* Whitespace normalization.Tim Peters2001-02-214-5/+4
|