Ka-Ping Yee
f170d7fea7
Don't have trace() skip the top frame; return them all.
2001-03-23 05:14:10 +00:00
Fred Drake
b0fefc5121
Convert the weakref test suite to PyUNIT, and add tests that exercise weak
...
references on function objects and both bound and unbound methods.
2001-03-23 04:22:45 +00:00
Fred Drake
84a5934f8a
When the regression test is run in verbose mode, make the PyUNIT-based
...
tests a little noisier, providing more progress information.
2001-03-23 04:21:17 +00:00
Fredrik Lundh
015415ed14
SRE 2.1b2: increase the chances that the sre test works on other
...
machines...
2001-03-22 23:48:28 +00:00
Fredrik Lundh
987f1332fe
SRE 2.1b2: forgot to update one output file (sorry, Fred!)
2001-03-22 23:29:04 +00:00
Fredrik Lundh
17741be466
SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicode
...
strings/patterns.
2001-03-22 15:51:28 +00:00
Fredrik Lundh
b25e1ad253
sre 2.1b2 update:
...
- take locale into account for word boundary anchors (#410271 )
- restored 2.0's *? behaviour (#233283 , #408936 and others)
- speed up re.sub/re.subn
2001-03-22 15:50:10 +00:00
Thomas Wouters
b0dbeef1c4
Allow the process of reading back what we wrote to a pty to transform
...
linefeeds into carriagereturn-linefeeds (which is apparently what IRIX
does.) Also add some comments, an extra test and reorganize it a bit.
2001-03-22 14:50:24 +00:00
Steve Purcell
5ddd1a8dcb
Updated to latest PyUnit version (1.31 in PyUnit CVS); test_support.py
...
changed accordingly.
2001-03-22 08:45:36 +00:00
Guido van Rossum
f6e47ad4bd
Check that f.keys() == [] right after creation -- this prevents bugs
...
like the one I just fixed to come back and haunt us.
2001-03-22 00:40:23 +00:00
Tim Peters
24a4191160
Changed doctest to run tests in alphabetic order of name.
...
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).
2001-03-21 23:07:59 +00:00
Jeremy Hylton
09ccc3a22a
Test that traceback module works with SyntaxErrors with or without carets.
2001-03-21 20:33:04 +00:00
Fred Drake
91751143eb
Add test cases for the fnmatch module.
2001-03-21 18:29:25 +00:00
Fred Drake
cd1b1dd6d2
Just import sys at the top instead of inside lots of functions.
...
Add some helpers for supporting PyUNIT-based unit testing.
2001-03-21 18:26:33 +00:00
Jeremy Hylton
5c7a2513ec
Add tests for recent changes:
...
- global stmt in class does not affect free vars in methods
- locals() works with free and cell vars
2001-03-21 16:44:39 +00:00
Tim Peters
eba5130e4f
Addrf simple test that import is case-sensitive.
2001-03-21 03:58:16 +00:00
Jeremy Hylton
e241e29f3d
Add test for a list comprehension that is nested in the left-hand part
...
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.
2001-03-19 20:42:11 +00:00
Tim Peters
9e6f278fc1
Repair test_doctest's expected-output file (Guido added some new output).
2001-03-18 20:14:25 +00:00
Tim Peters
0f33604e17
SF bug [ #409448 ] Complex division is braindead
...
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.
2001-03-18 08:21:57 +00:00
Tim Peters
30edd2387d
Whitespace normalization.
2001-03-16 08:29:48 +00:00
Guido van Rossum
a8f7e59761
Oops. A RISCOS patch I forgot to check in.
2001-03-13 09:31:07 +00:00
Jeremy Hylton
5b44a67bdb
Add test to verify that nested functions with free variables don't
...
cause the free variables to leak.
2001-03-13 02:01:12 +00:00
Fred Drake
63085d4d1e
Import the nested_scopes feature twice, to exercise the patch introduced
...
to avoid segfaults when more than one feature is named in the future
statement.
This tests for regression of SF bug #407394 .
2001-03-10 02:18:47 +00:00
Tim Peters
243bff4708
Clean up junk files left behind by imp.load_source().
2001-03-04 00:30:25 +00:00
Ka-Ping Yee
9054344d14
Replace literal '@test' with TESTFN.
2001-03-02 05:48:10 +00:00
Guido van Rossum
ca956e2e47
When catching errors from os.rmdir(), test for os.error, not IOError!
2001-03-02 05:46:17 +00:00
Tim Peters
d74bc432b2
Make names in __future__.py bind to class instances instead of 2-tuples.
...
Suggested on c.l.py by William Tanksley, and I like it.
2001-03-02 02:53:08 +00:00
Tim Peters
fc35de409b
test_global was broken by some recent checkin. Repairing.
2001-03-02 01:48:16 +00:00
Guido van Rossum
9aa643cf69
Test interaction of global and nested scopes -- thanks to Samuele Pedroni.
2001-03-01 20:35:45 +00:00
Tim Peters
251083142f
Whitespace normalization.
2001-03-01 08:31:39 +00:00
Skip Montanaro
40fc16059f
final round of __all__ lists (I hope) - skipped urllib2 because Moshe may be
...
giving it a slight facelift
2001-03-01 04:27:19 +00:00
Fred Drake
5c015344a6
Add tests for the .copy() methods of both weak dictionary classes.
2001-03-01 03:06:53 +00:00
Jeremy Hylton
2922ea8235
Add test case for global stmt at module level.
...
Fix test_grammar so that it ignores warning about global stmt at
module level in exec.
2001-02-28 23:49:19 +00:00
Jeremy Hylton
42efed0fc3
update output to reflect exception that is now raised
2001-02-28 23:24:22 +00:00
Jeremy Hylton
150a6640f5
Fix filter for SyntaxErrors
2001-02-28 22:50:15 +00:00
Jeremy Hylton
62e2c7e3df
Add regression test for future statements. This adds eight files, but
...
seven are not tests in their own right; these files are mentioned in
regrtest.
2001-02-28 17:48:06 +00:00
Tim Peters
85ba673b0a
Whitespace normalization.
2001-02-28 08:26:44 +00:00
Fred Drake
6e7e485d5d
Added regression test for SF tracker bug #403871 : AttributeError in
...
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!
2001-02-28 05:34:16 +00:00
Jeremy Hylton
8e43cd7929
verify that warnings are issued for bogus uses of global
2001-02-28 01:51:01 +00:00
Andrew M. Kuchling
6efc6e7832
Patch #404680 : disables the nis module and enables the dl module when
...
building under Cygwin. Makes some fixes to the dlmodule in order to
compile with Cygwin.
2001-02-27 20:54:23 +00:00
Jeremy Hylton
5941d191de
add from __future__ import nested_scopes to strings passed to compile
2001-02-27 20:23:58 +00:00
Martin v. Löwis
5e1633365d
Patch #403985 : Add support for weak-keyed dictionaries
2001-02-27 18:36:56 +00:00
Ka-Ping Yee
6397c7c9a9
inspect: a module for getting information out of live Python objects
2001-02-27 14:43:21 +00:00
Jeremy Hylton
29906eef3a
Preliminary support for future nested scopes
...
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.
2001-02-27 04:23:34 +00:00
Fred Drake
3c823aa4b6
Make sure ConfigParser uses .optionxform() consistently; this affects
...
.has_option(), .remove_option(), and .set().
This closes SF tracker #232913 .
2001-02-26 21:55:34 +00:00
Tim Peters
ffc215a279
Add __future__.py to std library, + dull test to verify that assignments
...
therein are of the proper form.
2001-02-26 21:14:49 +00:00
Barry Warsaw
c1e100f215
Additional tests for current, PEP described semantics:
...
- 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.
2001-02-26 18:07:26 +00:00
Barry Warsaw
22e4182d60
Describe -s a little more generically.
2001-02-23 18:31:40 +00:00
Tim Peters
0009c4ea59
Whitespace normalization.
2001-02-21 07:29:48 +00:00
Andrew M. Kuchling
9a0f98e0a1
Add test case from bug #124981 : zlib decompress of sync-flushed data
...
fails
2001-02-21 02:17:01 +00:00