diff options
author | Marc-André Lemburg <mal@egenix.com> | 2001-01-17 19:11:13 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2001-01-17 19:11:13 (GMT) |
commit | 3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e (patch) | |
tree | eea0f44df59aaaf014eb4580f1fad308e31601bf /Lib/test/test_urllib.py | |
parent | 8551dd60781f738e5e5ef4e22b6f071d27e20b50 (diff) | |
download | cpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.zip cpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.tar.gz cpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.tar.bz2 |
This patch removes all uses of "assert" in the regression test suite
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 81533e1..d2d5d63 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -1,4 +1,5 @@ # Minimal test of the quote function +from test_support import verify, verbose import urllib chars = 'abcdefghijklmnopqrstuvwxyz'\ @@ -11,20 +12,20 @@ chars = 'abcdefghijklmnopqrstuvwxyz'\ expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de' test = urllib.quote(chars) -assert test == expected, "urllib.quote problem" +verify(test == expected, "urllib.quote problem") test2 = urllib.unquote(expected) -assert test2 == chars +verify(test2 == chars) in1 = "abc/def" out1_1 = "abc/def" out1_2 = "abc%2fdef" -assert urllib.quote(in1) == out1_1, "urllib.quote problem" -assert urllib.quote(in1, '') == out1_2, "urllib.quote problem" +verify(urllib.quote(in1) == out1_1, "urllib.quote problem") +verify(urllib.quote(in1, '') == out1_2, "urllib.quote problem") in2 = "abc?def" out2_1 = "abc%3fdef" out2_2 = "abc?def" -assert urllib.quote(in2) == out2_1, "urllib.quote problem" -assert urllib.quote(in2, '?') == out2_2, "urllib.quote problem" +verify(urllib.quote(in2) == out2_1, "urllib.quote problem") +verify(urllib.quote(in2, '?') == out2_2, "urllib.quote problem") |