Commit Graph

23 Commits

Author SHA1 Message Date
Raymond Hettinger 8c6c12ca96 Temporarily disable this test. It's been broken for a week. 2008-02-09 10:06:20 +00:00
Christian Heimes f5806ab6e3 Small adjustments for test compact freelist test. It's no passing on Windows as well. 2008-02-04 19:30:05 +00:00
Christian Heimes f4033ab245 Increase debugging to investige failing tests on some build bots 2008-02-04 18:48:38 +00:00
Christian Heimes 422051a367 Patch #1953
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
2008-02-04 18:00:12 +00:00
Andrew M. Kuchling 7ce9b18460 Typo fixes 2008-01-15 01:29:16 +00:00
Christian Heimes c94e2b5c12 Now that I've learnt about structseq objects I felt like converting sys.float_info to a structseq. It's
readonly and help(sys.float_info) explains the attributes nicely.
2008-01-14 04:13:37 +00:00
Christian Heimes f31b69f9db Applied patch #1816: sys.flags patch 2008-01-14 03:42:48 +00:00
Christian Heimes dfdfaab1c5 Feature #1534
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
2007-12-01 11:20:10 +00:00
Tim Peters 0c4a3b330d current_frames_with_threads(): There's actually no way
to guess /which/ line the spawned thread is in at the time
sys._current_frames() is called:  we know it finished
enter_g.set(), but can't know whether the instruction
counter has advanced to the following leave_g.wait().
The latter is overwhelming most likely, but not guaranteed,
and I see that the "x86 Ubuntu dapper (icc) trunk" buildbot
found it on the other line once.  Changed the test so it
passes in either case.
2006-07-25 04:07:22 +00:00
Tim Peters 112aad3630 SF bug 1524317: configure --without-threads fails to build
Moved the code for _PyThread_CurrentFrames() up, so it's no longer
in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in
one).

Changed test_sys's test_current_frames() so it passes with or without
thread supported compiled in.

Note that test_sys fails when Python is compiled without threads,
but for an unrelated reason (the old test_exit() fails with an
indirect ImportError on the `thread` module).  There are also
other unrelated compilation failures without threads, in extension
modules (like ctypes); at least the core compiles again.

Do we really support --without-threads?  If so, there are several
problems remaining.
2006-07-19 00:03:19 +00:00
Tim Peters 32a8361f2d After approval from Anthony, merge the tim-current_frames
branch into the trunk.  This adds a new sys._current_frames()
function, which returns a dict mapping thread id to topmost
thread stack frame.
2006-07-10 21:08:24 +00:00
Martin v. Löwis a8cd7a26d4 Add test case for #43581. 2006-04-03 11:05:39 +00:00
Walter Dörwald 4e41a4b64c Disable a few other tests, that can't work if Python is compiled without
Unicode support.
2005-08-03 17:09:04 +00:00
Tim Peters f0db38dbf8 Whitespace normalization. 2005-02-15 21:50:12 +00:00
Michael W. Hudson f058858347 Test that SystemExits are handled properly by the exit machinery. I
broke the "raise SystemExit(46)" case when doing new-style exceptions,
but I'd much rather have found out here than in test_tempfile (growl).
2005-02-15 15:26:11 +00:00
Tim Peters e5e065b669 New function sys.getcheckinterval(), to complement setcheckinterval(). 2003-07-06 18:36:54 +00:00
Walter Dörwald 21d3a32b99 Combine the functionality of test_support.run_unittest()
and test_support.run_classtests() into run_unittest()
and use it wherever possible.

Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.

From SF patch #662807.
2003-05-01 17:45:56 +00:00
Guido van Rossum d6473d1ac5 Reindent the new code properly. 2003-03-01 03:25:41 +00:00
Guido van Rossum 46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Tim Peters f2715e0764 Whitespace normalization. 2003-02-19 02:35:07 +00:00
Neal Norwitz eb2a5ef36a Fix SF bug #688424, 64-bit test problems 2003-02-18 15:22:10 +00:00
Walter Dörwald e7028ac56c Fix typo. 2003-02-03 23:05:27 +00:00
Walter Dörwald c3502467d4 Add a new test script that tests various features of the sys
module. This increases code coverage of Python/sysmodule.c
from 68% to 77% (on Linux).

The script doesn't exercise the error branch that handles an evil
or lost sys.excepthook in Python/pythonrun.c::PyErr_PrintEx().

Also this script might not work on Jython in its current form.

From SF patch #662807.
2003-02-03 23:03:49 +00:00