summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-12 23:48:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-12 23:48:08 (GMT)
commitb2fdf351e8fcd064ed8ee9ff92db77f8d7d93d7a (patch)
tree8eb77494d098c9b3eab799fe9687ac0f2d60ab54 /Lib
parent0995b875c47f6f57087c40f5022fa3f878b5a89f (diff)
downloadcpython-b2fdf351e8fcd064ed8ee9ff92db77f8d7d93d7a.zip
cpython-b2fdf351e8fcd064ed8ee9ff92db77f8d7d93d7a.tar.gz
cpython-b2fdf351e8fcd064ed8ee9ff92db77f8d7d93d7a.tar.bz2
remove test_multifile
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_multifile.py66
1 files changed, 0 insertions, 66 deletions
diff --git a/Lib/test/test_multifile.py b/Lib/test/test_multifile.py
deleted file mode 100644
index b29137c..0000000
--- a/Lib/test/test_multifile.py
+++ /dev/null
@@ -1,66 +0,0 @@
-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()