Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
af45b115
Commit
af45b115
authored
Jan 04, 2010
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill a couple of "<>"
parent
b9d4963a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/email/test/test_email.py
Lib/email/test/test_email.py
+2
-2
Lib/email/test/test_email_renamed.py
Lib/email/test/test_email_renamed.py
+2
-2
Lib/test/test_wsgiref.py
Lib/test/test_wsgiref.py
+2
-2
No files found.
Lib/email/test/test_email.py
View file @
af45b115
...
@@ -51,7 +51,7 @@ def openfile(filename, mode='r'):
...
@@ -51,7 +51,7 @@ def openfile(filename, mode='r'):
class
TestEmailBase
(
unittest
.
TestCase
):
class
TestEmailBase
(
unittest
.
TestCase
):
def
ndiffAssertEqual
(
self
,
first
,
second
):
def
ndiffAssertEqual
(
self
,
first
,
second
):
"""Like assertEqual except use ndiff for readable output."""
"""Like assertEqual except use ndiff for readable output."""
if
first
<>
second
:
if
first
!=
second
:
sfirst
=
str
(
first
)
sfirst
=
str
(
first
)
ssecond
=
str
(
second
)
ssecond
=
str
(
second
)
diff
=
difflib
.
ndiff
(
sfirst
.
splitlines
(),
ssecond
.
splitlines
())
diff
=
difflib
.
ndiff
(
sfirst
.
splitlines
(),
ssecond
.
splitlines
())
...
@@ -2775,7 +2775,7 @@ class TestCharset(unittest.TestCase):
...
@@ -2775,7 +2775,7 @@ class TestCharset(unittest.TestCase):
# Try a charset with None body encoding
# Try a charset with None body encoding
c
=
Charset
(
'us-ascii'
)
c
=
Charset
(
'us-ascii'
)
eq
(
'hello world'
,
c
.
body_encode
(
'hello world'
))
eq
(
'hello world'
,
c
.
body_encode
(
'hello world'
))
# Try the convert argument, where input codec
<>
output codec
# Try the convert argument, where input codec
!=
output codec
c
=
Charset
(
'euc-jp'
)
c
=
Charset
(
'euc-jp'
)
# With apologies to Tokio Kikuchi ;)
# With apologies to Tokio Kikuchi ;)
try
:
try
:
...
...
Lib/email/test/test_email_renamed.py
View file @
af45b115
...
@@ -52,7 +52,7 @@ def openfile(filename, mode='r'):
...
@@ -52,7 +52,7 @@ def openfile(filename, mode='r'):
class
TestEmailBase
(
unittest
.
TestCase
):
class
TestEmailBase
(
unittest
.
TestCase
):
def
ndiffAssertEqual
(
self
,
first
,
second
):
def
ndiffAssertEqual
(
self
,
first
,
second
):
"""Like assertEqual except use ndiff for readable output."""
"""Like assertEqual except use ndiff for readable output."""
if
first
<>
second
:
if
first
!=
second
:
sfirst
=
str
(
first
)
sfirst
=
str
(
first
)
ssecond
=
str
(
second
)
ssecond
=
str
(
second
)
diff
=
difflib
.
ndiff
(
sfirst
.
splitlines
(),
ssecond
.
splitlines
())
diff
=
difflib
.
ndiff
(
sfirst
.
splitlines
(),
ssecond
.
splitlines
())
...
@@ -2770,7 +2770,7 @@ class TestCharset(unittest.TestCase):
...
@@ -2770,7 +2770,7 @@ class TestCharset(unittest.TestCase):
# Try a charset with None body encoding
# Try a charset with None body encoding
c
=
Charset
(
'us-ascii'
)
c
=
Charset
(
'us-ascii'
)
eq
(
'hello world'
,
c
.
body_encode
(
'hello world'
))
eq
(
'hello world'
,
c
.
body_encode
(
'hello world'
))
# Try the convert argument, where input codec
<>
output codec
# Try the convert argument, where input codec
!=
output codec
c
=
Charset
(
'euc-jp'
)
c
=
Charset
(
'euc-jp'
)
# With apologies to Tokio Kikuchi ;)
# With apologies to Tokio Kikuchi ;)
try
:
try
:
...
...
Lib/test/test_wsgiref.py
View file @
af45b115
...
@@ -523,7 +523,7 @@ class HandlerTests(TestCase):
...
@@ -523,7 +523,7 @@ class HandlerTests(TestCase):
"Content-Length: %d
\
r
\
n
"
"Content-Length: %d
\
r
\
n
"
"
\
r
\
n
%s"
%
(
h
.
error_status
,
len
(
h
.
error_body
),
h
.
error_body
))
"
\
r
\
n
%s"
%
(
h
.
error_status
,
len
(
h
.
error_body
),
h
.
error_body
))
self
.
assert
True
(
h
.
stderr
.
getvalue
().
find
(
"AssertionError"
)
<>
-
1
)
self
.
assert
NotEqual
(
h
.
stderr
.
getvalue
().
find
(
"AssertionError"
),
-
1
)
def
testErrorAfterOutput
(
self
):
def
testErrorAfterOutput
(
self
):
MSG
=
"Some output has been sent"
MSG
=
"Some output has been sent"
...
@@ -536,7 +536,7 @@ class HandlerTests(TestCase):
...
@@ -536,7 +536,7 @@ class HandlerTests(TestCase):
self
.
assertEqual
(
h
.
stdout
.
getvalue
(),
self
.
assertEqual
(
h
.
stdout
.
getvalue
(),
"Status: 200 OK
\
r
\
n
"
"Status: 200 OK
\
r
\
n
"
"
\
r
\
n
"
+
MSG
)
"
\
r
\
n
"
+
MSG
)
self
.
assert
True
(
h
.
stderr
.
getvalue
().
find
(
"AssertionError"
)
<>
-
1
)
self
.
assert
NotEqual
(
h
.
stderr
.
getvalue
().
find
(
"AssertionError"
),
-
1
)
def
testHeaderFormats
(
self
):
def
testHeaderFormats
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment