Commit Graph

1117 Commits

Author SHA1 Message Date
Guido van Rossum 288cd2cb69 Fix the test so it uses IterableUserDict for the "for x in dict" test. 2001-08-07 17:50:06 +00:00
Guido van Rossum 15d86c6297 Remove the test for the 'object' type -- it can no longer be
instantiated.  (Its use as a base class is adequately tested by other
tests.)
2001-08-07 16:53:42 +00:00
Jeremy Hylton cd738364ce silence warnings about import * 2001-08-07 16:38:19 +00:00
Greg Ward cbce202f82 Hack to workaround bug #445984: attempt to import _socket before
starting the test suite proper.  If _socket fails to build, that will
make this test fail with an ImportError -- handled by the test harness
as "no such module _socket" -- instead of an AttributeError deep in
CGIHTTPServer.
2001-08-04 22:22:19 +00:00
Tim Peters c173137391 Derived from SF patch #446899 Permit import of .pyw under Windows, from
David Bolen.
2001-08-04 08:12:36 +00:00
Tim Peters e861365dab Don't use any characters C doesn't guarantee are safe for text-mode files.
This should stop the bizarre translations Jack was getting from Mac CVS.
2001-08-03 20:40:18 +00:00
Fred Drake 84bb9d8dc4 Fix stupid bug: when migrating these tests from the Zope repository, the
names of the test methods were not changed from the Zope-standard "check"
names to the Python-standard "test_" names, so the tests were not actually
being run.

Added test of hexadecimal character references as a regression check for
SF bug #445196.
2001-08-03 19:53:01 +00:00
Jack Jansen fffd7224df The test opened the binary test data files in text mode! Fixed. 2001-08-03 13:04:03 +00:00
Fred Drake 4fd06e0170 Make sure that WeakValueDictionary[] raises KeyError instead of TypeError
for keys that are not in the dictionary.
2001-08-03 04:11:27 +00:00
Tim Peters d342c62961 This test failed under python -O.
rewrite_file():  Delete both .pyc and .pyo leftovers, and explicitly close
the new source file after writing to it.
2001-08-02 17:23:11 +00:00
Guido van Rossum 394a47b268 Unit test for improved package import semantics.
Original by Alex Coventry (in SF patch #441791), adapted to the
standard regression test framework.
2001-08-02 14:14:20 +00:00
Tim Peters 6d6c1a35e0 Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
Tim Peters 722d78f18a s/endswith/startswith/ 2001-08-01 20:23:18 +00:00
Tim Peters 66e1a254a1 Rewritten version of Finn Bock's SF patch #446907 (Allow jython to
complete test_import).
2001-08-01 19:38:56 +00:00
Tim Peters 108efac24e test_codeup should not have had an expected-output file; removing it. 2001-07-30 23:10:44 +00:00
Jeremy Hylton b7a7731e01 Add tests for getattr() and hasattr() with non-string args 2001-07-30 22:49:11 +00:00
Jeremy Hylton 5121e7de11 Fix for SF bug [ #443866 ] Evaluating func_code causing core dump
Add test that calls eval with a code object that has free variables.
2001-07-30 21:55:29 +00:00
Jeremy Hylton 3c19ec4eab Fix when pyexpat not built
Import pyexpat first so that import error occurs when it is not
available.
2001-07-30 21:47:25 +00:00
Martin v. Löwis 3bd071e3f7 Patch #442866: Tests for codeop.py. 2001-07-30 12:30:08 +00:00
Tim Peters 33dc0a1705 One more crack at join(): stop trying to pretend this isn't a mass of
special cases.  test_pkg works again on Windows.
2001-07-27 08:09:54 +00:00
Tim Peters 4223f89edd Change ntpath.join() so that join("d:/", "/whatever") returns
d:/whatever instead of /whatever.  While I'm afraid changing isabs()
to be *consistent* with this would break lots of code, it makes
best sense for join() to do it this way.  Thanks to Alex Martelli for
pushing back on this one!
2001-07-26 21:54:37 +00:00
Tim Peters 7321ec437b SF bug #444510: int() should guarantee truncation.
It's guaranteed now, assuming the platform modf() works correctly.
2001-07-26 20:02:17 +00:00
Marc-André Lemburg 80d1dd5f3b Fix for bug #444493: u'\U00010001' segfaults with current CVS on
wide builds.
2001-07-25 16:05:59 +00:00
Fred Drake f973c6d594 Make this test work under Windows as well. 2001-07-23 16:30:21 +00:00
Fred Drake 99e87f9e23 Test for the "glob" module, contributed by Nick Mathewson.
Heavily modified so this doesn't break on Windows.
This closes SF patch #441175.
2001-07-23 16:08:36 +00:00
Tim Peters fa712ca1ed Whitespace normalization.
Note:  This test fails on Windows.  Don't know why yet.
2001-07-23 09:44:21 +00:00
Fred Drake 4c81d60fcb Tests for the "commands" module, contributed by Nick Mathewson.
This closes SF patch #440291.
2001-07-23 04:08:01 +00:00
Fred Drake 1586136193 New tests by Nick Mathewson, for the fpformat module.
This closes SF patch #440290.
2001-07-23 02:46:35 +00:00
Tim Peters 137759407b On WIndows, skip the part of test_dircache that can't work on Windows. 2001-07-21 02:22:14 +00:00
Tim Peters 87cc0c329e Whitespace normalization, plus:
+ test_quopri.py relied on significant trailing spaces.  Fixed.
+ test_dircache.py (still) doesn't work on Windows (directory mtime on
  Windows doesn't work like it does on Unix).
2001-07-21 01:41:30 +00:00
Fred Drake 79e75e1916 Use string.ascii_letters instead of string.letters (SF bug #226706). 2001-07-20 19:05:50 +00:00
Marc-André Lemburg 6c6bfb7c70 Make the unicode-escape and the UTF-16 codecs handle surrogates
correctly and thus roundtrip-safe.

Some minor cleanups of the code.

Added tests for the roundtrip-safety.
2001-07-20 17:39:11 +00:00
Fred Drake 84073bfdb0 Regression test for the dircache module, contributed by Nick Mathewson.
Modified by Fred Drake.
This closes SF patch #440827.
2001-07-19 22:59:09 +00:00
Fred Drake 8e6669ad05 Test for the repr module, contributed by Nick Mathewson.
This closes SF patch #440826.
2001-07-19 22:27:56 +00:00
Tim Peters d4f7f609bf Add some test cases for ntpath.join(). 2001-07-19 19:11:41 +00:00
Tim Peters 3b5e4d1e3c Cosmetic: break the long lines in test_ntpath.py, and get rid of its
expected-output file.
2001-07-19 19:02:12 +00:00
Fred Drake acd32d3be5 Added function xml.sax.saxutils.quoteattr().
This closes SF bug #440351.  It should not be moved to Python 2.1.1.
2001-07-19 16:10:15 +00:00
Fred Drake 1f4cc897f8 Remove a couple of lines from the test that proved not to be portable to
all platforms that offer tempnam().
2001-07-17 21:56:01 +00:00
Fred Drake 38c2ef0a4c Start of a test suite for the "os" module -- this only tests the temporary
file management functions that have just been made available on more
platforms.
2001-07-17 20:52:51 +00:00
Fred Drake 6e4f2c09df Use the "st" versions of the "ast" calls in the parser module -- there is
no reason to pretend the syntax trees we're dealing with are abstract.
2001-07-17 19:33:25 +00:00
Fred Drake cf580c7ea1 Added tests for the new yield support in the parser module.
(Should be merged with descr branch.)
2001-07-17 03:01:29 +00:00
Tim Peters 861adac23e This has never worked on Windows. Now it does. If it breaks on Unix now,
great, it's your turn to watch it fail for months <0.9 wink>.
2001-07-16 20:49:49 +00:00
Barry Warsaw 06069330e3 test_basic(): Add a test for "person@dom.ain (User J. Person)" which
was already correctly parsed (contrary to a comment in Mailman).

test_rfc2822_phrases(): RFC 2822 now requires that we allow `.' in
phrases, which means we must accept dots in unquoted realname parts.
Add a test to check the change in rfc822.py 1.58.
2001-07-16 20:44:16 +00:00
Fred Drake 19ff4ac7e9 Add a unit test for sgmllib (needs work, but has already caught problems).
Based on the test for the HTMLParser module.
2001-07-16 18:52:40 +00:00
Fred Drake 14f6c18b62 Give more useful information about a failing PyUnit-style test. 2001-07-16 18:51:32 +00:00
Fred Drake 50bc19fce5 Remove a duplicate test. 2001-07-16 18:50:29 +00:00
Tim Peters 5ba5866281 Part way to allowing "from __future__ import generators" to communicate
that info to code dynamically compiled *by* code compiled with generators
enabled.  Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags.  Perhaps I should not have?  I doubted it was
*intended* to be part of the public API, so just did.
2001-07-16 02:29:45 +00:00
Guido van Rossum 0960015056 Should raise TestSkipped, not ImportError, when deciding to skip the
test.
2001-07-13 17:27:57 +00:00
Tim Peters 9a8c8e270b Having fun on my own time: quicker flat_conjoin; Knights Tour solver
simplified and generalized to rectangular boards.
2001-07-13 09:12:12 +00:00
Tim Peters a1d545523d Remove the last remnants of the hacks to worm around leaks. 2001-07-12 22:55:42 +00:00