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
b2fdf351
Commit
b2fdf351
authored
May 12, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove test_multifile
parent
0995b875
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
+0
-66
Lib/test/test_multifile.py
Lib/test/test_multifile.py
+0
-66
No files found.
Lib/test/test_multifile.py
deleted
100644 → 0
View file @
0995b875
import
mimetools
import
multifile
import
io
msg
=
"""Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="=====================_590453667==_"
X-OriginalArrivalTime: 05 Feb 2002 03:43:23.0310 (UTC) FILETIME=[42D88CE0:01C1ADF7]
--=====================_590453667==_
Content-Type: multipart/alternative;
boundary="=====================_590453677==_.ALT"
--=====================_590453677==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
test A
--=====================_590453677==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<b>test B</font></b></html>
--=====================_590453677==_.ALT--
--=====================_590453667==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="att.txt"
Attached Content.
Attached Content.
Attached Content.
Attached Content.
--=====================_590453667==_--
"""
def
getMIMEMsg
(
mf
):
global
boundaries
,
linecount
msg
=
mimetools
.
Message
(
mf
)
#print "TYPE: %s" % msg.gettype()
if
msg
.
getmaintype
()
==
'multipart'
:
boundary
=
msg
.
getparam
(
"boundary"
)
boundaries
+=
1
mf
.
push
(
boundary
)
while
mf
.
next
():
getMIMEMsg
(
mf
)
mf
.
pop
()
else
:
lines
=
mf
.
readlines
()
linecount
+=
len
(
lines
)
def
test_main
():
global
boundaries
,
linecount
boundaries
=
0
linecount
=
0
f
=
io
.
StringIO
(
msg
)
getMIMEMsg
(
multifile
.
MultiFile
(
f
))
assert
boundaries
==
2
assert
linecount
==
9
if
__name__
==
'__main__'
:
test_main
()
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