summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_new.py
Commit message (Collapse)AuthorAgeFilesLines
* SF patch 1495675: Remove types.InstanceType and new.instanceGuido van Rossum2006-05-261-12/+2
| | | | (Collin Winter)
* Fix for rather inaccurately titled bugMichael W. Hudson2005-03-301-0/+10
| | | | | | | | | [ 1165306 ] Property access with decorator makes interpreter crash Don't allow the creation of unbound methods with NULL im_class, because attempting to call such crashes. Backport candidate.
* Whitespace normalization.Tim Peters2004-08-131-5/+5
|
* Fix bugMichael W. Hudson2004-08-121-6/+62
| | | | | | | | | | [ 1005248 ] new.code() not cleanly checking its arguments using the result of new.code() can still destroy the sun, but merely calling the function shouldn't any more. I also rewrote the existing tests of new.code() to use vastly less un-bogus arguments, and added tests for the previous insane behaviours.
* note a really bad test (no time to fix now)Michael W. Hudson2004-06-121-0/+1
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Extend function() to support an optional closure argument.Jeremy Hylton2002-07-111-0/+24
| | | | Also, simplify some ref counting for other optional arguments.
* Moved a print statement outside the jython platform test. OtherwiseFinn Bock2001-12-091-1/+1
| | | | | the output fails to compare correctly for jython. This change was part of the original patch #403666.
* 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.
* Whitespace normalization.Tim Peters2001-02-091-2/+2
|
* move extra arguments to the back of the new.code() arglistJeremy Hylton2001-02-011-1/+4
|
* Added tests for new signature of new.instance().Fred Drake2001-01-281-7/+15
| | | | Use test_support.verify() where applicable.
* PEP 227 implementationJeremy Hylton2001-01-251-1/+2
| | | | | test_new: new.code() noew takes two more arguments test_grammer: Add a bunch of test cases for lambda (not really PEP 227 related)
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | 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-3/+3
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-1/+1
|
* new.code() has grown another foot, eh, another two arguments.Guido van Rossum1997-01-271-1/+1
|
* Add stacksize argument to new.code().Guido van Rossum1997-01-171-1/+1
|
* test_rotor.py: New test of the rotor module.Barry Warsaw1996-12-231-1/+20
| | | | | | | test_*: converted to the new test harness. GvR note! test_signal.py works interatively (i.e. when verbose=1) but does not work inside the test harness. It must be a timing issue, but I haven't figured it out yet.
* A test of the `new' module. The new.code() test is fairly bogus sinceBarry Warsaw1996-12-101-0/+44
I'm really not sure what the proper inputs are. I do flex the function call though by passing in arguments of the proper type. I don't try to exec the code object that gets returned!