Benjamin Peterson
bec087f29d
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
2009-03-26 21:10:30 +00:00
Benjamin Peterson
ad57d97596
fix naming
2009-03-26 20:49:40 +00:00
Benjamin Peterson
888a39b54c
remove test_support.TestSkipped and just use unittest.SkipTest
2009-03-26 20:48:25 +00:00
Benjamin Peterson
21f6aac633
apply the second part of #4242 's patch; classify all the implementation details in test_descr
2009-03-26 20:17:27 +00:00
Benjamin Peterson
47d9738b0f
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
2009-03-26 20:05:50 +00:00
Benjamin Peterson
c3141a6e96
add some useful utilities for skipping tests with unittest's new skipping ability
...
most significantly apply a modified portion of the patch from #4242 with
patches for skipping implementation details
2009-03-26 19:58:18 +00:00
Benjamin Peterson
0ad9b7727d
add support for PyPy
2009-03-26 19:09:21 +00:00
Benjamin Peterson
94e4e2a7e5
roll old test in with new one
2009-03-26 18:58:30 +00:00
Benjamin Peterson
b457b89323
more and more implementations now support sys.subversion
2009-03-26 18:55:48 +00:00
Benjamin Peterson
f521b8c6d2
add much better tests for python version information parsing
2009-03-26 18:35:37 +00:00
Benjamin Peterson
2f6f7436aa
this can be slightly less ugly
2009-03-25 21:42:51 +00:00
Marc-André Lemburg
a519cfc953
Remove the sys.version_info shortcut, since they cause the APIs
...
to return different information than the _sys_version() output
used in previous Python versions.
This also fixes issue5561: platform.python_version_tuple returns tuple of ints, should be strings
Added more tests for the various platform functions.
2009-03-25 19:44:58 +00:00
Benjamin Peterson
2bf74fd0ac
this is better written using assertRaises
2009-03-24 03:24:56 +00:00
Benjamin Peterson
cb2b0e45d4
comply with the evilJavaNamingScheme for attribute names
...
It seems my love of PEP 8 overrode the need for consistentcy
2009-03-23 22:29:45 +00:00
Benjamin Peterson
692428e77f
implement test skipping and expected failures
...
patch by myself #1034053
2009-03-23 21:50:21 +00:00
Antoine Pitrou
f8387af262
Issue #4688 : Add a heuristic so that tuples and dicts containing only
...
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
on long-running programs, depending on their particular use of datatypes.
(trivia: this makes the "binary_trees" benchmark from the Computer Language
Shootout 40% faster)
2009-03-23 18:41:45 +00:00
Benjamin Peterson
704dc269e3
AttributeError can be thrown during recursion errors
2009-03-22 22:24:58 +00:00
Lars Gustäbel
2020a59563
Issue #5068 : Fixed the tarfile._BZ2Proxy.read() method that would loop
...
forever on incomplete input. That caused tarfile.open() to hang when used
with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
partial bzip2 compressed data.
2009-03-22 20:09:33 +00:00
Mark Dickinson
efc82f7e8e
Issue #4258 : Use 30-bit digits for Python longs, on 64-bit platforms.
...
Backport of r70459.
2009-03-20 15:51:55 +00:00
Raymond Hettinger
2412299be9
* Add clearer comment to initialization code.
...
* Add optional argument to popitem() -- modeled
after Anthon van der Neut's C version.
* Fix method markup in docs.
2009-03-19 19:59:58 +00:00
Benjamin Peterson
6ffe852f90
fix strange errors when setting attributes on tracebacks #4034
2009-03-18 20:52:15 +00:00
Mark Dickinson
b14514a153
Fix bug in _insert_thousands_sep: too much zero padding could be
...
added for 'n' formats with non-repeating thousands-separator.
2009-03-18 08:22:51 +00:00
Mark Dickinson
277859d591
Issue #2110 : Add support for thousands separator and 'n' format specifier
...
to Decimal __format__ method.
2009-03-17 23:03:46 +00:00
Mark Dickinson
b065e52bc2
Fix bug in Decimal __format__ method that swapped left and right
...
alignment.
2009-03-17 18:01:03 +00:00
Eric Smith
2ace4cf813
Unicode format tests weren't actually testing unicode. This was probably due to the original backport from py3k.
2009-03-14 14:37:38 +00:00
Eric Smith
6f42edb682
Issue 5237, Allow auto-numbered replacement fields in str.format() strings.
...
For simple uses for str.format(), this makes the typing easier. Hopfully this
will help in the adoption of str.format().
For example:
'The {} is {}'.format('sky', 'blue')
You can mix and matcth auto-numbering and named replacement fields:
'The {} is {color}'.format('sky', color='blue')
But you can't mix and match auto-numbering and specified numbering:
'The {0} is {}'.format('sky', 'blue')
ValueError: cannot switch from manual field specification to automatic field numbering
Will port to 3.1.
2009-03-14 11:57:26 +00:00
Antoine Pitrou
feeafff052
Issue #1222 : locale.format() bug when the thousands separator is a space character.
2009-03-14 00:07:21 +00:00
Brett Cannon
6c4cff0f32
Require implementations for warnings.showwarning() support the 'line' argument.
...
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652 .
2009-03-11 04:51:06 +00:00
Raymond Hettinger
56411aac79
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
2009-03-10 12:50:59 +00:00
Raymond Hettinger
bac769bb5e
Small optimization for corner case where maxlen==0.
2009-03-10 09:31:48 +00:00
Hirokazu Yamamoto
09033068f1
mmap.resize for anonymous map is not working yet, so changed to real file mapping...
2009-03-05 14:52:44 +00:00
Hirokazu Yamamoto
264fc12fbf
Issue #5385 : Fixed mmap crash after resize failure on windows.
...
Now uses NULL instead of INVALID_HANDLE_VALUE as invalid map handle
because CreateFileMapping returns NULL when error occurs.
2009-03-05 14:21:12 +00:00
Brett Cannon
417937733f
Fix some more bugs caused by the backport from 3.x for importlib.
...
Do a more exact copy of the final 3.x code to resolve bugs and add
appropriate tests.
2009-03-04 01:00:53 +00:00
Raymond Hettinger
131af6505a
Backport 70140, 70141, 70143, and 70144.
...
Adds tests, switches from list to deque, fixes __reduce__
which was unnecessarily copying __keys.
2009-03-03 22:59:25 +00:00
Raymond Hettinger
f17f81d9c8
Beef-up tests.
2009-03-03 07:12:09 +00:00
Raymond Hettinger
bc512d3abd
Backport PEP 372: OrderedDict()
2009-03-03 04:45:34 +00:00
Benjamin Peterson
7d49bba969
give httplib.IncompleteRead a more sane repr #4308
2009-03-02 22:41:42 +00:00
Jeffrey Yasskin
68d6852006
Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
...
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
2009-02-28 19:03:21 +00:00
Hirokazu Yamamoto
b0e10c760c
Issue #1733986 : Fixed mmap crash in accessing elements of second map object
...
with same tagname but larger size than first map. (Windows)
2009-02-28 12:13:07 +00:00
Hirokazu Yamamoto
f2dc885780
Issue #5386 : mmap.write_byte didn't check map size, so it could cause buffer
...
overrun.
2009-02-28 10:31:54 +00:00
Brett Cannon
ac10be365e
Fix a bug where code was trying to index an int. Left over from the situation
...
from using str.rpartition to str.rindex.
Closes Issue5213.
2009-02-27 03:38:28 +00:00
Benjamin Peterson
b3dd5485da
remove deprecated symtable.Symbol methods
2009-02-26 19:07:18 +00:00
Brett Cannon
b7019d8e9e
Expand upon test_site.test_s_option to try to debug its failure.
2009-02-24 22:01:02 +00:00
Raymond Hettinger
8c56f8890e
Backport 69934: Register xrange() as a Sequence.
2009-02-24 12:23:23 +00:00
Antoine Pitrou
b03f532fe5
Revert debugging statements, culprit is possibly test_distutils (see #5316 )
2009-02-22 18:20:46 +00:00
Antoine Pitrou
13d1690ecd
Try to make sense of the test_site buildbot failures
2009-02-22 17:25:52 +00:00
Mark Dickinson
3e4caeb3bf
Issue #5341 : Fix a variety of spelling errors.
2009-02-21 20:27:01 +00:00
Raymond Hettinger
aa681c7b99
Fix keyword arguments for itertools.count().
...
Step arg without a start arg was ignored.
2009-02-21 07:17:22 +00:00
Collin Winter
8725dce2ae
Issue 5176: special-case string formatting in BINARY_MODULO implementation. This shows a modest (1-3%) speed-up in templating systems, for example.
2009-02-20 19:30:41 +00:00
Raymond Hettinger
8f9a1eee0d
Inline coefficients in gamma(). Add reflection formula. Add comments.
2009-02-19 09:50:24 +00:00
Raymond Hettinger
f9bce83e71
Add some cross-references to the docs. Simplify the python code equivalent for izip(). Supply an optional argument for the nth() recipe.
2009-02-19 05:34:35 +00:00
Raymond Hettinger
182edaefb5
Add keyword arg support to itertools.repeat().
2009-02-19 02:38:25 +00:00
Raymond Hettinger
2e2909f584
Add keyword arg support to itertools.compress().
2009-02-19 02:15:14 +00:00
Hirokazu Yamamoto
17a837e4db
Issue #5282 : Fixed mmap resize on 32bit windows and unix. When offset > 0,
...
The file was resized to wrong size.
2009-02-17 13:17:26 +00:00
Hirokazu Yamamoto
f6bbd0e71d
Issue #5292 : Fixed mmap crash on its boundary access m[len(m)].
2009-02-17 10:12:10 +00:00
Raymond Hettinger
b21d8109af
Add GC support to count() objects. Backport candidate.
2009-02-16 20:39:12 +00:00
Mark Dickinson
2ffb26fb83
Issue #5260 : Various portability and standards compliance fixes, optimizations
...
and cleanups in Objects/longobject.c. The most significant change is that
longs now use less memory: average savings are 2 bytes per long on 32-bit
systems and 6 bytes per long on 64-bit systems. (This memory saving already
exists in py3k.)
2009-02-15 10:13:41 +00:00
Georg Brandl
f3715d2fc7
#5179 : don't leak PIPE fds when child execution fails.
2009-02-14 17:01:36 +00:00
Benjamin Peterson
95777bb019
this needn't be a shebang line
2009-02-14 17:00:51 +00:00
Benjamin Peterson
76afd3b8d0
we're no longer using CVS, so this doesn't have to be binary
2009-02-14 16:51:03 +00:00
Raymond Hettinger
a4038038c6
Add keyword argument support to itertools.count().
2009-02-14 00:25:51 +00:00
Georg Brandl
0638a08a4b
#3694 : add test for fix committed in r66693.
2009-02-13 11:03:59 +00:00
Gregory P. Smith
ea38826ab2
- Issue #3745 : Fix hashlib to always reject unicode and non buffer-api
...
supporting objects as input no matter how it was compiled (built in
implementations or external openssl library).
(backported from a py3k branch)
2009-02-13 03:00:00 +00:00
Raymond Hettinger
dbe3bfbb30
One more test.
2009-02-12 12:43:01 +00:00
Raymond Hettinger
aa04461260
Add an extra testcase.
2009-02-12 12:04:26 +00:00
Raymond Hettinger
31c769ca89
Issue 5032: added a step argument to itertools.count() and allowed non-integer arguments.
2009-02-12 05:39:46 +00:00
Gregory P. Smith
3605b5cee3
Issue #1008086 : Fixes socket.inet_aton() to always return 4 bytes even
...
on LP64 platforms (most 64-bit Linux, bsd, unix systems).
2009-02-11 23:45:25 +00:00
Mark Dickinson
4015f62e39
Issue #5175 : PyLong_AsUnsignedLongLong now raises OverflowError for
...
negative arguments. Previously, it raised TypeError.
Thanks Lisandro Dalcin.
2009-02-10 15:46:50 +00:00
Brett Cannon
28d108893c
compileall used the ctime of bytecode and source to determine if the bytecode
...
should be recreated. This created a timing hole. Fixed by just doing what
import does; check the mtime and magic number.
2009-02-10 02:07:38 +00:00
Raymond Hettinger
322daea7c3
Issue 1818: collections.namedtuple() to support automatic renaming of invalid fieldnames.
2009-02-10 01:24:05 +00:00
Guilherme Polo
55bdb8e4ac
Checking for tk availability before continuing (basically the same that is done in test_ttk_guionly)
2009-02-09 19:57:04 +00:00
Guilherme Polo
bbb7efd72b
Some tests for Tkinter.Text.search
2009-02-09 19:21:21 +00:00
Vinay Sajip
b20af944d2
Issue #5170 : Fixed Unicode output bug in logging and added test case. This is a regression which did not occur in 2.5.
2009-02-08 19:06:08 +00:00
Nick Coghlan
0194f5bc98
Issue #4512 closeout: Make ZipImport.get_filename() a public method
2009-02-08 03:17:00 +00:00
Nick Coghlan
d39600e69f
Issue 4195: Restore the ability to execute packages with the -m switch (but this time in a way that leaves the import machinery in a valid state). (Original patch by Andi Vajda)
2009-02-08 01:26:34 +00:00
Benjamin Peterson
096c3ad41d
make destinsrc private
2009-02-07 19:08:22 +00:00
Neil Schemenauer
f8741eacf5
Add test for issue #999042 , explict global statement works.
2009-02-07 18:35:16 +00:00
Neil Schemenauer
8573d62f8f
Fix broken test in test_hotshot. Treating the current directory as an
...
empty file is sloppy and non-portable. Use NamedTemporaryFile to make
an empty file.
2009-02-07 14:53:31 +00:00
Guilherme Polo
8e5e438d21
Eliminated the need to use ttk.__loadtk__ and the problems related it.
2009-02-07 02:20:29 +00:00
Armin Rigo
5561986da3
Ivan on IRC in #twisted reported this crasher.
2009-02-06 11:46:26 +00:00
Kristján Valur Jónsson
e20f54f542
Fix a number of Win32ErrorTests error cases. chmod wasn't being tested. 'access' never raises an error.
2009-02-06 10:17:34 +00:00
Eric Smith
81fe09344c
Implement issue #4285 , convert sys.version_info to a named
...
tuple. Patch by Ross Light.
2009-02-06 00:48:26 +00:00
Raymond Hettinger
d507afdc81
Minor doc fixups.
2009-02-04 10:52:32 +00:00
Kristján Valur Jónsson
fd4c872726
issue 4804: Provide checks for the format string of strftime, and for the "mode" string of fopen on Windows. These strings are user provided from python and so we can avoid invoking the C runtime invalid parameter handler by first checking that they are valid.
2009-02-04 10:05:25 +00:00
Raymond Hettinger
2c8585b0af
Register decimals as numbers.Number
2009-02-03 03:37:03 +00:00
Raymond Hettinger
d6fc2623c5
Validate that __length_hint__ returns a usable result.
2009-02-03 02:23:19 +00:00
Raymond Hettinger
b516370bcb
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
2009-02-02 21:50:13 +00:00
Guilherme Polo
3b331dd3ea
Restore Tkinter.Tk._loadtk so this test doesn't fail for problems
...
related to ttk.
2009-02-01 02:56:16 +00:00
Gregory P. Smith
de1a8b720a
- Issue #5104 : The socket module now raises OverflowError when 16-bit port and
...
protocol numbers are supplied outside the allowed 0-65536 range on bind()
and getservbyport().
2009-01-31 22:57:30 +00:00
Mark Dickinson
f709ab8526
Add an extra test for long <-> float hash equivalence.
2009-01-31 16:44:04 +00:00
Benjamin Peterson
1de05e9b2a
check the errno in bad fd cases
2009-01-31 01:42:55 +00:00
Benjamin Peterson
b3619be995
make _tkinter._flatten check the result of PySequence_Size for errors #3880
2009-01-30 02:24:39 +00:00
Antoine Pitrou
707c593761
Issue #2047 : shutil.move() could believe that its destination path was
...
inside its source path if it began with the same letters (e.g. "src" vs.
"src.new").
2009-01-29 20:19:34 +00:00
Raymond Hettinger
f779e6f51b
Issue 4920: Fixed next() vs __next__() issues in the ABCs
...
for Iterator and MutableSet. Also added thorough test for
required abstractmethods.
2009-01-28 23:02:26 +00:00
Guilherme Polo
b1a98de25e
Issue #5083 : New 'gui' resource for regrtest.
2009-01-28 20:03:26 +00:00
Guilherme Polo
7a77ee88af
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
...
* Added ttk tests to the expected skips mapping just like where test_tcl
was expected to be skipped too.
2009-01-28 19:28:04 +00:00
Guilherme Polo
cda93aafde
Added the ttk module. See issue #2983 : Ttk support for Tkinter.
2009-01-28 13:09:03 +00:00
Raymond Hettinger
560f9a8a90
Add more tests for the powerset() recipe.
2009-01-27 13:26:35 +00:00
Raymond Hettinger
2f6c2e03a8
More exhaustive combinatoric checks.
2009-01-27 10:36:14 +00:00
Raymond Hettinger
f93f3032c6
Stronger tests for combinatoric relationships.
2009-01-27 09:52:35 +00:00