Commit Graph

500 Commits

Author SHA1 Message Date
Thomas Wouters a701597138 Fix inconsistent use of tab/space in indentation. 2000-07-30 15:38:35 +00:00
Mark Hammond af4cfae300 Test that after resizing the mmap'd file, we can't seek beyond the new size. 2000-07-30 02:20:38 +00:00
Andrew M. Kuchling 85ab7384f6 Exercise .readline() and .readlines(). More data is written to the
test file, too, so the methods have more work to do.
2000-07-29 20:18:34 +00:00
Mark Hammond 152e3f0885 Was quite broken and incomplete. Now passes the test suite, but is still incomplete. 2000-07-28 03:45:32 +00:00
Trent Mick c64c8ea71c Remove erroneous empty trailing line. (cause test_winreg.py failure) 2000-07-27 23:26:28 +00:00
Fredrik Lundh 9407e553c0 -- changed test to work on platforms which have os.popen
but no os.fork
2000-07-27 07:42:43 +00:00
Peter Schneider-Kamp fdee0f0aa7 added test case for fixed duplicate arguments bug in Python/compile.c 2000-07-25 22:15:45 +00:00
Andrew M. Kuchling c1b4624447 Made an error message slightly more useful if select() returns something goofy 2000-07-25 00:51:31 +00:00
Fredrik Lundh 82c330e591 -- updated to include known problems in SRE 0.9.6
(cf. test/output/test_sre)
2000-07-24 22:35:11 +00:00
Fred Drake 1790dd4b66 Restore TestSkipped exception; appears to have disappeared in last checkin.
Make both TextFailed and TestSkipped subclasses of Error, which derives
from Exception.  Docstrings have been added for the exceptions and module.
2000-07-24 06:55:00 +00:00
Fredrik Lundh 8a3ebf8ca8 -- SRE 0.9.6 sync. this includes:
+ added "regs" attribute
 + fixed "pos" and "endpos" attributes
 + reset "lastindex" and "lastgroup" in scanner methods
 + removed (?P#id) syntax; the "lastindex" and "lastgroup"
   attributes are now always set
 + removed string module dependencies in sre_parse
 + better debugging support in sre_parse
 + various tweaks to build under 1.5.2
2000-07-23 21:46:17 +00:00
Skip Montanaro e9e5dcd4db restructured a bit and added some more content... 2000-07-19 17:19:49 +00:00
Skip Montanaro 4d06923122 make TestFailed a class exception 2000-07-19 17:14:48 +00:00
Thomas Wouters baf2663e44 Enable extra testing now that os.isatty() is in. (Also tests os.isatty ;P) 2000-07-19 14:51:54 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Vladimir Marangozov 5ff2ac2fa9 Break a cycle created in the saboteur() function. 2000-07-15 00:42:09 +00:00
Vladimir Marangozov d57f5cff0e Break the cycles after testing cmp() on cyclic objects. 2000-07-14 04:32:09 +00:00
Skip Montanaro 56509a3cb8 new test for posixpath module 2000-07-12 00:20:45 +00:00
Skip Montanaro e809b00f36 new test file for posixpath module 2000-07-12 00:20:08 +00:00
Jeremy Hylton 88887aa38e small updates to string_join:
use PyString_AS_STRING macro on local string object
    when resizing string, make sure resized string will always be big enough
    split string containing error message across two lines
add test to string_tests that causes resizing
2000-07-11 20:55:38 +00:00
Fred Drake 85f363990c Create two new exceptions: IndentationError and TabError. These are
used for indentation related errors.  This patch includes Ping's
improvements for indentation-related error messages.

Closes SourceForge patches #100734 and #100856.
2000-07-11 17:53:00 +00:00
Jeremy Hylton fff9e20943 fix bug #42 reported by Andrew Dalke
The Compare close contains a close method that checks to see if there
is any unconsumed data in the Compare instance; i.e. if the canonical
output file contains more data than was produced by the current test
run. This method was never called, allowing differences to go
undetected.

Fix is to call close after the test is run (after __import__)

output/test_long and output/test_popen2 needed trivial changes
output/test_select contained lots of text, but test_select.py produced
    no output
2000-07-11 15:15:31 +00:00
Peter Schneider-Kamp 7a11671e8b fixed inconsistent use of tab and spaces 2000-07-11 11:24:41 +00:00
Andrew M. Kuchling d3cf692c38 Add test of resize() method of mmap objects 2000-07-11 10:45:28 +00:00
Jeremy Hylton 20f41b6456 add more tests of string.join variants to run_method_tests 2000-07-11 03:31:55 +00:00
Jeremy Hylton f82b04ecbb factor out test definitions to string_tests module
test_string and test_userstring run same tests for string methods
2000-07-10 17:08:42 +00:00
Guido van Rossum 1bbddd085c Added the line 'Testing UTF-16 code point order comparisons... done."
to match addition to test_unicode.py.
2000-07-10 15:06:06 +00:00
Jeremy Hylton a5ae490584 expect message "no regression test case for method 'encode' 2000-07-10 14:14:40 +00:00
Marc-André Lemburg d6d06ade26 Tests for new surrogate support in the UTF-8 codec. By Bill Tutt. 2000-07-07 17:48:52 +00:00
Marc-André Lemburg b6d78fcd9c Tests for new instance support in unicode(). 2000-07-07 13:46:19 +00:00
Marc-André Lemburg 9d4674168f Added tests for the new .isalpha() and .isalnum() methods. 2000-07-05 09:46:40 +00:00
Paul Prescod 99b84bdaad Removed some tabs. 2000-07-04 03:38:10 +00:00
Fredrik Lundh 72b82ba16d - fixed grouping error bug
- changed "group" operator to "groupref"
2000-07-03 21:31:48 +00:00
Fredrik Lundh 6f01398236 - added lookbehind support (?<=pattern), (?<!pattern).
the pattern must have a fixed width.

- got rid of array-module dependencies; the match pro-
  gram is now stored inside the pattern object, rather
  than in an extra string buffer.

- cleaned up a various of potential leaks, api abuses,
  and other minors in the engine module.

- use mal's new isalnum macro, rather than my own work-
  around.

- untabified test_sre.py.  seems like I removed a couple
  of trailing spaces in the process...
2000-07-03 18:44:21 +00:00
Fred Drake 17647f5201 Compute the name of the test file so that it can be found both when this
test is run as a script and when imported via the regression test
framework.

Problem reported by Phillip Porch <root@theporch.com>.
2000-07-03 16:37:42 +00:00
Paul Prescod ebc0473c05 Fixed test output 2000-07-01 19:17:43 +00:00
Paul Prescod 7993bcc040 Added minidom tests. 2000-07-01 14:54:16 +00:00
Guido van Rossum 54610f31cc output for openpty test 2000-07-01 03:34:14 +00:00
Guido van Rossum a0f7e8574c Thomas Wouters: Test script for openpty() 2000-07-01 01:13:31 +00:00
Fred Drake 4c136eefab Thomas Wouters <thomas@xs4all.net>:
Test case for the pty module.
2000-06-30 23:22:35 +00:00
Fred Drake 96fee02917 Output for test_winreg2.
Someone who knows what they are doing needs to replace this with something
that makes sense -- I'm not running Windows right now.
2000-06-30 19:38:16 +00:00
Fred Drake 2658d15d45 Paul Prescod <paul@prescod.net>:
Regression test for the new winreg.py module.

[Could a Windows person someone please review this?]
2000-06-30 19:36:23 +00:00
Fredrik Lundh 4ccea94152 - reverted to "\x is binary byte"
- removed evil tabs from sre_parse and sre_compile
2000-06-30 18:39:20 +00:00
Skip Montanaro ab1c7918f6 * added a randomize flag and corresponding -r command line argument that
allows the caller to execute the various tests in pseudo-random order -
  default is still to execute tests in the order returned by findtests().

* moved initialization of the various flag variables to the main() function
  definition, making it possible to execute regrtest.main() interactively
  and still override default behavior.
2000-06-30 16:39:27 +00:00
Guido van Rossum 2850d18615 Switch to sre for regular expression matching (the new mini-re module
is actually by Fredrik Lundh).  This will break the re tests --
Fredrik will fix this before the final release.
2000-06-30 16:25:20 +00:00
Jeremy Hylton 094c9e587c remove all prints (since the prints where of memory locations) 2000-06-30 15:13:15 +00:00
Fredrik Lundh 0640e1161f the mad patcher strikes again:
-- added pickling support (only works if sre is imported)

-- fixed wordsize problems in engine
   (instead of casting literals down to the character size,
   cast characters up to the literal size (same as the code
   word size).  this prevents false hits when you're matching
   a unicode pattern against an 8-bit string. (unfortunately,
   this broke another test, but I think the test should be
   changed in this case; more on that on python-dev)

-- added sre.purge function
   (unofficial, clears the cache)
2000-06-30 13:55:15 +00:00
Fredrik Lundh 43b3b49b5a - fixed lookahead assertions (#10, #11, #12)
- untabified sre_constants.py
2000-06-30 10:41:31 +00:00
Marc-André Lemburg 587794b386 Marc-Andre Lemburg <mal@lemburg.com>:
Added test output.
2000-06-30 10:28:32 +00:00
Marc-André Lemburg d70141a2d9 Marc-Andre Lemburg <mal@lemburg.com>:
New test for huge formatting strings (these could cause core
dumps in previous versions).

By Trent Mick.
2000-06-30 10:26:29 +00:00