Commit Graph

8084 Commits

Author SHA1 Message Date
Skip Montanaro 9593792da3 test_sre is dead! long live test_re! 2003-04-25 15:59:12 +00:00
Skip Montanaro 35b9ff3683 deleted more tests which were either already in test_re or that I migrated
in the last revison
2003-04-25 15:41:19 +00:00
Skip Montanaro 1e703c6278 more tests converted from test_sre 2003-04-25 15:40:28 +00:00
Skip Montanaro bf7ad96d36 Remove tests which were migrated to test_re.py. There are still more tests
to migrate.
2003-04-25 15:17:03 +00:00
Guido van Rossum f4001eed3b Skip testing inet_ntop() an inet_pton() if they aren't defined.
This makes the test pass on Windows again (and on other platforms
that don't have these).
2003-04-25 15:11:23 +00:00
Guido van Rossum 51735b0569 Fix the tests on Windows, by writing the test data file in binary
mode.

XXX I'm not convinced that this is the right solution -- arguably,
on Windows, the _fileobject class should honor the mode argument
and do newline translation.  But it's never done that so I think
there's no urgent need to fix this today.
2003-04-25 15:01:05 +00:00
Skip Montanaro 1448d4719c rework Sniffer api significantly 2003-04-25 14:47:16 +00:00
Skip Montanaro 48816c6f04 some sniffer tests 2003-04-25 14:43:14 +00:00
Skip Montanaro 2726fcd4b6 more tests from test_sre 2003-04-25 14:31:54 +00:00
Fred Drake 7c852f33a2 Attempt to deal with some obvious errors in the code. These were all
due to using a single module-level namespace where multiple namespaces
were used before.

There *really* need to be tests for the sniffer stuff.  This could
have been avoided.

Skip, please review, and add sniffer tests!
2003-04-25 14:27:00 +00:00
Guido van Rossum 376e636f18 New version from Vinaj, should solve the threading problems (hopefully). 2003-04-25 14:22:00 +00:00
Skip Montanaro 7d9963fea8 copy a few tests from test_sre 2003-04-25 14:12:40 +00:00
Walter Dörwald dbcede5d66 Port test_bool.py to PyUnit. From SF patch #662807. 2003-04-25 10:22:01 +00:00
Brett Cannon 74bfd70e92 Complete rewrite of module. Only has tests using temporary files; net tests
should go in test_urllibnet.py .

Still need to write tests for _urlopener usage and urlretrieve.
2003-04-25 09:39:47 +00:00
Tim Peters c4e0940042 New generator os.walk() does a bit more than os.path.walk() does, and
seems much easier to use.  Code, docs, NEWS, and additions to test_os.py
(testing this sucker is a bitch!).
2003-04-25 07:11:48 +00:00
Guido van Rossum 47dfa4a89a Patch by Jp Calderone:
- The socket module now provides the functions inet_pton and inet_ntop
  for converting between string and packed representation of IP addresses.
  See SF patch #658327.

This still needs a bit of work in the doc area, because it is not
available on all platforms (especially not on Windows).
2003-04-25 05:48:32 +00:00
Guido van Rossum 45f4130029 test_re is no longer needed 2003-04-25 01:44:40 +00:00
Guido van Rossum 46144be02c Fix test_limitations(). The match there is *expected* to raise
RuntimeError.
2003-04-25 01:40:11 +00:00
Andrew M. Kuchling 0b85203954 [Patch #628208] Test the 'nil' extension 2003-04-25 00:27:24 +00:00
Andrew M. Kuchling a4c2b7485b [Patch #628208] Add optional support for the 'nil' extension 2003-04-25 00:26:51 +00:00
Skip Montanaro da4ec5a7bc csv is a module again 2003-04-24 20:23:12 +00:00
Skip Montanaro 04ae7056cf cvs is going to be a module again 2003-04-24 20:21:31 +00:00
Raymond Hettinger b34ef94d46 SF bug 557704: netrc module can't handle all passwords
Let netrc handle entries with login fields (mail servers for instance)
by having login default to ''.

Backport candidate.
2003-04-24 20:11:20 +00:00
Skip Montanaro bfcbfa7c46 move imports in Binary class to top level to avoid repeated imports.
use cStringIO if available.
2003-04-24 19:51:31 +00:00
Skip Montanaro fa012610c4 new method: has_function() - returns a boolean indicating whether the
argument function is available on the current platform
2003-04-24 19:49:23 +00:00
Skip Montanaro 8ed06da754 first cut at unittest version of re tests 2003-04-24 19:43:18 +00:00
Skip Montanaro d839ecdc81 if the test is run directly (__name__ == "__main__") don't actually require
particular resources
2003-04-24 19:06:57 +00:00
Skip Montanaro 142da98beb remove test_socketserver from the skip lists 2003-04-24 19:05:41 +00:00
Barry Warsaw c4acc2bd32 GNUTranslations:
__init__(): Removed since we no longer need the coerce flag.
    Message ids and strings are now always coerced to Unicode, /if/
    the catalog specified a charset parameter.

    gettext(), ngettext(): Since the message strings are Unicodes in
    the catalog, coerce back to encoded 8-bit strings on return.

    ugettext(), ungettext(): Coerce the message ids to Unicode when
    there's no entry for the id in the catalog.

Minor code cleanups; use booleans where appropriate.
2003-04-24 18:13:39 +00:00
Barry Warsaw edb155fda1 UnicodeTranslationsTest.setUp(): Removed the coerce flag to the
GNUTranslations constructor.
2003-04-24 18:08:13 +00:00
Raymond Hettinger 9928571f3f SF bug 665835: filter() treatment of str and tuple inconsistent
As a side issue on this bug, it was noted that list and tuple iterators
used macros to directly access containers and would not recognize
__getitem__ overrides.  If the method is overridden, the patch returns
a generic sequence iterator which calls the __getitem__ method; otherwise,
it returns a high custom iterator with direct access to container elements.
2003-04-24 16:52:47 +00:00
Andrew M. Kuchling 47c2ab6b54 Fix docstring typo 2003-04-24 16:36:49 +00:00
Thomas Heller 54aa5781d5 This test now uses the separate getargs_X functions from _testcapimodule. 2003-04-24 16:15:29 +00:00
Tim Peters 0eadaac7dc Whitespace normalization. 2003-04-24 16:02:54 +00:00
Barry Warsaw 0822ff7cca Get rid of some hard coded tabs 2003-04-24 15:58:47 +00:00
Raymond Hettinger 352f9477da SF patch 695710: fix bug 678519: cStringIO self iterator
(requested by GvR. patch contributed by Michael Stone)
2003-04-24 15:50:11 +00:00
Raymond Hettinger 024aaa1bfe SF Patch 549151: urllib2 POSTs on redirect
(contributed by John J Lee)
2003-04-24 15:32:12 +00:00
Andrew M. Kuchling 9f4eb6b719 [Patch #679505] Silence DeprecationWarning when testing rotor module 2003-04-24 13:18:25 +00:00
Marc-André Lemburg 366a0feb9a Reformatted a bit to remove the lengthy re.compile() from the function
definitions.
2003-04-24 11:46:35 +00:00
Marc-André Lemburg 246d847475 New module platform.py, submitted by Marc-Andre Lemburg.
There's no separate documentation for this module yet - apart from the
doc-strings which explain the APIs.
2003-04-24 11:36:11 +00:00
Raymond Hettinger f4cf76dd5e Revert the previous enhancement to the bytecode optimizer.
The additional code complexity and new NOP opcode were not worth it.
2003-04-24 05:45:23 +00:00
Brett Cannon 7d618c731c Fix docstring for URLOpener.retrieve() in regards to opening a local file 2003-04-24 02:43:20 +00:00
Walter Dörwald ce07c8a9bf Max OS X returns "*" as the password in grp.getgrall()
and "" in grep.getgrgid(). Adjust the test to work
around this problem. This should fix SF bug #724771.
2003-04-23 19:50:24 +00:00
Raymond Hettinger 6eca358695 SF 557704: netrc module can't handle all passwords
Expanded the range of allowable characters to include ascii punctuation.
Allows resource files to have a larger character set for passwords.
(Idea contributed by Bram Moolenaar.)
2003-04-23 18:59:54 +00:00
Neal Norwitz a256f7d36f Fix SF bug #723801, logging.setLoggerClass() doesn't support new-style classes 2003-04-23 13:12:19 +00:00
Neal Norwitz f297bd1937 SF patch #725904, Minor changes to logging from module author (Vinay Sajip)
- upgrade to version 0.4.8
2003-04-23 03:49:43 +00:00
Jack Jansen 2b4b5a54d6 Fix by Lars Gustaebel for bug 721871: don't get upset if the prefix
field contains garbage after the first NUL character.
2003-04-22 22:03:11 +00:00
Fred Drake b28271f24d Do a little more searching for the data file for the test: this allows
using a build directory just inside the source directory and saving
just one copy of the test data in the source tree, rather than having
a copy in each build directory.
2003-04-22 18:15:05 +00:00
Jeremy Hylton c8c8b94c59 Only produce a dotted module name when writing output to a separate
directory.
2003-04-22 15:35:51 +00:00
Jack Jansen d69b744531 If not icon file is specified use the default Python Applet icons.
Fixes 719303.
2003-04-22 14:33:48 +00:00