Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Facundo Batista 5af2f7454d Fixes issue 1959. Converted tests to unittest.
Thanks Giampaolo Rodola.
2008-02-06 19:28:49 +00:00
Walter Dörwald 70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Barry Warsaw 817918cc3c Committing patch #591250 which provides "str1 in str2" when str1 is a
string of longer than 1 character.
2002-08-06 16:58:21 +00:00
Barry Warsaw 408b6d34de Complete the absolute import patch for the test suite. All relative
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.
2002-07-30 23:27:12 +00:00
Martin v. Löwis 339d0f720e Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
2001-08-17 18:39:25 +00:00
Tim Peters de9725f135 Make 'x in y' and 'x not in y' (PySequence_Contains) play nice w/ iterators.
NEEDS DOC CHANGES
A few more AttributeErrors turned into TypeErrors, but in test_contains
this time.
The full story for instance objects is pretty much unexplainable, because
instance_contains() tries its own flavor of iteration-based containment
testing first, and PySequence_Contains doesn't get a chance at it unless
instance_contains() blows up.  A consequence is that
    some_complex_number in some_instance
dies with a TypeError unless some_instance.__class__ defines __iter__ but
does not define __getitem__.
2001-05-05 10:06:17 +00:00
Fred Drake 004d5e6880 Make reindent.py happy (convert everything to 4-space indents!). 2000-10-23 17:22:08 +00:00
Jeremy Hylton 7c4f96f442 Deviant1 didn't work as advertised 2000-04-27 21:42:48 +00:00
Jeremy Hylton 035a07e263 add some more contains tests on the builtin types 2000-04-27 21:40:08 +00:00
Guido van Rossum 45ad3c4897 Marc-Andre Lemburg:
* More test cases for test_contains.py.
2000-04-10 13:52:13 +00:00
Guido van Rossum da2361ac1d Add tests for char in string -- including required exceptions for
non-char in string.
2000-03-07 15:52:01 +00:00
Guido van Rossum 24512e6a35 Test cases for __contains__ code, by Moshe Zadka. 2000-03-06 21:00:29 +00:00