summaryrefslogtreecommitdiff
path: root/Lib/test/test_class.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-16/+16
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Issue #9869: Make long() and PyNumber_Long return something of typeMark Dickinson2010-09-261-1/+1
| | | | | | | long for a class whose __long__ method returns a plain int. This fixes an interpreter crash (due to long_subtype_new assuming PyNumber_Long returns a long) when initializing an instance of a long subclass from an object whose __long__ method returns a plain int.
* #7092 - Silence more py3k deprecation warnings, using ↵Florent Xicluna2010-03-211-3/+7
| | | | test_support.check_py3k_warnings() helper.
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-12/+4
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-4/+12
| | | | Patch by flox
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Port test_class to unittest. Patch #1671298.Georg Brandl2007-08-241-286/+497
|
* Correctly forward exception in instance_contains().Martin v. Löwis2006-11-081-0/+8
| | | | | Fixes #1591996. Patch contributed by Neal Norwitz. Will backport.
* (arre, arigo) SF bug #1350060Armin Rigo2006-06-081-0/+34
| | | | | | Give a consistent behavior for comparison and hashing of method objects (both user- and built-in methods). Now compares the 'self' recursively. The hash was already asking for the hash of 'self'.
* Don't use 'is not' to compare strings.Michael W. Hudson2005-05-041-1/+1
| | | | (spotted by reading pypy-svn :)
* Check the type of values returned by __int__, __float__, __long__,Neil Schemenauer2004-07-191-27/+80
| | | | | | __oct__, and __hex__. Raise TypeError if an invalid type is returned. Note that PyNumber_Int and PyNumber_Long can still return ints or longs. Fixes SF bug #966618.
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* Added test for this fix to classobject.c:Guido van Rossum2002-10-291-0/+27
| | | | | | | | Since properties are supported here, is possible that instance_getattr2() raises an exception. Fix all code that made this assumption. Backport candidate.
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* Fix for SF bug 532646. This is a little simpler than what NealGuido van Rossum2002-06-131-0/+14
| | | | | suggested there, based upon a better analysis (__getattr__ is a red herring). Will backport to 2.2.
* Fiddle test_class so it passes with -Qnew.Tim Peters2001-12-111-5/+20
|
* Committing and closing SF patch #403671 by Finn Bock to help JythonBarry Warsaw2001-08-201-11/+31
| | | | pass these tests.
* Finn Bock (SF patch #103345): Avoid outdated exec form inGuido van Rossum2001-01-221-2/+2
| | | | test_class.py.
* Add test that ensures hash() of objects defining __cmp__ or __eq__ butGuido van Rossum2001-01-181-0/+23
| | | | not __hash__ raises TypeError.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-9/+8
|
* Fix for test_class.py on Win64. id(self), which on Win64 returns aTrent Mick2000-10-041-1/+1
| | | | | PyLong, was used for the return value of a class __hash__ method, which *must* return a PyInt. Solution: hash() the id(self) value.
* Apply SF patch #101029: call __getitem__ with a proper slice object if thereThomas Wouters2000-08-171-0/+219
is no __getslice__ available. Also does the same for C extension types. Includes rudimentary documentation (it could use a cross reference to the section on slice objects, I couldn't figure out how to do that) and a test suite for all Python __hooks__ I could think of, including the new behaviour.