Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c6938d

Browse files
committed
Ran svneol.py
1 parent b303fef commit 3c6938d

40 files changed

Lines changed: 19557 additions & 19557 deletions

Lib/ctypes/test/test_errno.py

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
import unittest, os, errno
2-
from ctypes import *
3-
from ctypes.util import find_library
4-
import threading
5-
6-
class Test(unittest.TestCase):
7-
def test_open(self):
8-
libc_name = find_library("c")
9-
if libc_name is not None:
10-
libc = CDLL(libc_name, use_errno=True)
11-
if os.name == "nt":
12-
libc_open = libc._open
13-
else:
14-
libc_open = libc.open
15-
16-
libc_open.argtypes = c_char_p, c_int
17-
18-
self.failUnlessEqual(libc_open("", 0), -1)
19-
self.failUnlessEqual(get_errno(), errno.ENOENT)
20-
21-
self.failUnlessEqual(set_errno(32), errno.ENOENT)
22-
self.failUnlessEqual(get_errno(), 32)
23-
24-
25-
def _worker():
26-
set_errno(0)
27-
28-
libc = CDLL(libc_name, use_errno=False)
29-
if os.name == "nt":
30-
libc_open = libc._open
31-
else:
32-
libc_open = libc.open
33-
libc_open.argtypes = c_char_p, c_int
34-
self.failUnlessEqual(libc_open("", 0), -1)
35-
self.failUnlessEqual(get_errno(), 0)
36-
37-
t = threading.Thread(target=_worker)
38-
t.start()
39-
t.join()
40-
41-
self.failUnlessEqual(get_errno(), 32)
42-
set_errno(0)
43-
44-
if os.name == "nt":
45-
46-
def test_GetLastError(self):
47-
dll = WinDLL("kernel32", use_last_error=True)
48-
GetModuleHandle = dll.GetModuleHandleA
49-
GetModuleHandle.argtypes = [c_wchar_p]
50-
51-
self.failUnlessEqual(0, GetModuleHandle("foo"))
52-
self.failUnlessEqual(get_last_error(), 126)
53-
54-
self.failUnlessEqual(set_last_error(32), 126)
55-
self.failUnlessEqual(get_last_error(), 32)
56-
57-
def _worker():
58-
set_last_error(0)
59-
60-
dll = WinDLL("kernel32", use_last_error=False)
61-
GetModuleHandle = dll.GetModuleHandleW
62-
GetModuleHandle.argtypes = [c_wchar_p]
63-
GetModuleHandle("bar")
64-
65-
self.failUnlessEqual(get_last_error(), 0)
66-
67-
t = threading.Thread(target=_worker)
68-
t.start()
69-
t.join()
70-
71-
self.failUnlessEqual(get_last_error(), 32)
72-
73-
set_last_error(0)
74-
75-
if __name__ == "__main__":
76-
unittest.main()
1+
import unittest, os, errno
2+
from ctypes import *
3+
from ctypes.util import find_library
4+
import threading
5+
6+
class Test(unittest.TestCase):
7+
def test_open(self):
8+
libc_name = find_library("c")
9+
if libc_name is not None:
10+
libc = CDLL(libc_name, use_errno=True)
11+
if os.name == "nt":
12+
libc_open = libc._open
13+
else:
14+
libc_open = libc.open
15+
16+
libc_open.argtypes = c_char_p, c_int
17+
18+
self.failUnlessEqual(libc_open("", 0), -1)
19+
self.failUnlessEqual(get_errno(), errno.ENOENT)
20+
21+
self.failUnlessEqual(set_errno(32), errno.ENOENT)
22+
self.failUnlessEqual(get_errno(), 32)
23+
24+
25+
def _worker():
26+
set_errno(0)
27+
28+
libc = CDLL(libc_name, use_errno=False)
29+
if os.name == "nt":
30+
libc_open = libc._open
31+
else:
32+
libc_open = libc.open
33+
libc_open.argtypes = c_char_p, c_int
34+
self.failUnlessEqual(libc_open("", 0), -1)
35+
self.failUnlessEqual(get_errno(), 0)
36+
37+
t = threading.Thread(target=_worker)
38+
t.start()
39+
t.join()
40+
41+
self.failUnlessEqual(get_errno(), 32)
42+
set_errno(0)
43+
44+
if os.name == "nt":
45+
46+
def test_GetLastError(self):
47+
dll = WinDLL("kernel32", use_last_error=True)
48+
GetModuleHandle = dll.GetModuleHandleA
49+
GetModuleHandle.argtypes = [c_wchar_p]
50+
51+
self.failUnlessEqual(0, GetModuleHandle("foo"))
52+
self.failUnlessEqual(get_last_error(), 126)
53+
54+
self.failUnlessEqual(set_last_error(32), 126)
55+
self.failUnlessEqual(get_last_error(), 32)
56+
57+
def _worker():
58+
set_last_error(0)
59+
60+
dll = WinDLL("kernel32", use_last_error=False)
61+
GetModuleHandle = dll.GetModuleHandleW
62+
GetModuleHandle.argtypes = [c_wchar_p]
63+
GetModuleHandle("bar")
64+
65+
self.failUnlessEqual(get_last_error(), 0)
66+
67+
t = threading.Thread(target=_worker)
68+
t.start()
69+
t.join()
70+
71+
self.failUnlessEqual(get_last_error(), 32)
72+
73+
set_last_error(0)
74+
75+
if __name__ == "__main__":
76+
unittest.main()

Lib/email/test/data/msg_26.txt

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
Received: from xcar [192.168.0.2] by jeeves.wooster.local
2-
(SMTPD32-7.07 EVAL) id AFF92F0214; Sun, 12 May 2002 08:55:37 +0100
3-
Date: Sun, 12 May 2002 08:56:15 +0100
4-
From: Father Time <[email protected]>
5-
6-
Subject: IMAP file test
7-
Message-ID: <[email protected]>
8-
X-Organization: Home
9-
User-Agent: Messenger-Pro/2.50a (MsgServe/1.50) (RISC-OS/4.02) POPstar/2.03
10-
MIME-Version: 1.0
11-
Content-Type: multipart/mixed; boundary="1618492860--2051301190--113853680"
12-
Status: R
13-
X-UIDL: 319998302
14-
15-
This message is in MIME format which your mailer apparently does not support.
16-
You either require a newer version of your software which supports MIME, or
17-
a separate MIME decoding utility. Alternatively, ask the sender of this
18-
message to resend it in a different format.
19-
20-
--1618492860--2051301190--113853680
21-
Content-Type: text/plain; charset=us-ascii
22-
23-
Simple email with attachment.
24-
25-
26-
--1618492860--2051301190--113853680
27-
Content-Type: application/riscos; name="clock.bmp,69c"; type=BMP; load=&fff69c4b; exec=&355dd4d1; access=&03
28-
Content-Disposition: attachment; filename="clock.bmp"
29-
Content-Transfer-Encoding: base64
30-
31-
Qk12AgAAAAAAAHYAAAAoAAAAIAAAACAAAAABAAQAAAAAAAAAAADXDQAA1w0AAAAAAAAA
32-
AAAAAAAAAAAAiAAAiAAAAIiIAIgAAACIAIgAiIgAALu7uwCIiIgAERHdACLuIgAz//8A
33-
zAAAAN0R3QDu7iIA////AAAAAAAAAAAAAAAAAAAAAAAAAAi3AAAAAAAAADeAAAAAAAAA
34-
C3ADMzMzMANwAAAAAAAAAAAHMAAAAANwAAAAAAAAAACAMAd3zPfwAwgAAAAAAAAIAwd/
35-
f8x/f3AwgAAAAAAAgDB0x/f3//zPAwgAAAAAAAcHfM9////8z/AwAAAAAAiwd/f3////
36-
////A4AAAAAAcEx/f///////zAMAAAAAiwfM9////3///8zwOAAAAAcHf3////B/////
37-
8DAAAAALB/f3///wd3d3//AwAAAABwTPf//wCQAAD/zAMAAAAAsEx/f///B////8wDAA
38-
AAAHB39////wf/////AwAAAACwf39///8H/////wMAAAAIcHfM9///B////M8DgAAAAA
39-
sHTH///wf///xAMAAAAACHB3f3//8H////cDgAAAAAALB3zH//D//M9wMAAAAAAAgLB0
40-
z39///xHAwgAAAAAAAgLB3d3RHd3cDCAAAAAAAAAgLAHd0R3cAMIAAAAAAAAgAgLcAAA
41-
AAMwgAgAAAAACDAAAAu7t7cwAAgDgAAAAABzcIAAAAAAAAgDMwAAAAAAN7uwgAAAAAgH
42-
MzMAAAAACH97tzAAAAALu3c3gAAAAAAL+7tzDABAu7f7cAAAAAAACA+3MA7EQAv/sIAA
43-
AAAAAAAIAAAAAAAAAIAAAAAA
44-
45-
--1618492860--2051301190--113853680--
1+
Received: from xcar [192.168.0.2] by jeeves.wooster.local
2+
(SMTPD32-7.07 EVAL) id AFF92F0214; Sun, 12 May 2002 08:55:37 +0100
3+
Date: Sun, 12 May 2002 08:56:15 +0100
4+
From: Father Time <[email protected]>
5+
6+
Subject: IMAP file test
7+
Message-ID: <[email protected]>
8+
X-Organization: Home
9+
User-Agent: Messenger-Pro/2.50a (MsgServe/1.50) (RISC-OS/4.02) POPstar/2.03
10+
MIME-Version: 1.0
11+
Content-Type: multipart/mixed; boundary="1618492860--2051301190--113853680"
12+
Status: R
13+
X-UIDL: 319998302
14+
15+
This message is in MIME format which your mailer apparently does not support.
16+
You either require a newer version of your software which supports MIME, or
17+
a separate MIME decoding utility. Alternatively, ask the sender of this
18+
message to resend it in a different format.
19+
20+
--1618492860--2051301190--113853680
21+
Content-Type: text/plain; charset=us-ascii
22+
23+
Simple email with attachment.
24+
25+
26+
--1618492860--2051301190--113853680
27+
Content-Type: application/riscos; name="clock.bmp,69c"; type=BMP; load=&fff69c4b; exec=&355dd4d1; access=&03
28+
Content-Disposition: attachment; filename="clock.bmp"
29+
Content-Transfer-Encoding: base64
30+
31+
Qk12AgAAAAAAAHYAAAAoAAAAIAAAACAAAAABAAQAAAAAAAAAAADXDQAA1w0AAAAAAAAA
32+
AAAAAAAAAAAAiAAAiAAAAIiIAIgAAACIAIgAiIgAALu7uwCIiIgAERHdACLuIgAz//8A
33+
zAAAAN0R3QDu7iIA////AAAAAAAAAAAAAAAAAAAAAAAAAAi3AAAAAAAAADeAAAAAAAAA
34+
C3ADMzMzMANwAAAAAAAAAAAHMAAAAANwAAAAAAAAAACAMAd3zPfwAwgAAAAAAAAIAwd/
35+
f8x/f3AwgAAAAAAAgDB0x/f3//zPAwgAAAAAAAcHfM9////8z/AwAAAAAAiwd/f3////
36+
////A4AAAAAAcEx/f///////zAMAAAAAiwfM9////3///8zwOAAAAAcHf3////B/////
37+
8DAAAAALB/f3///wd3d3//AwAAAABwTPf//wCQAAD/zAMAAAAAsEx/f///B////8wDAA
38+
AAAHB39////wf/////AwAAAACwf39///8H/////wMAAAAIcHfM9///B////M8DgAAAAA
39+
sHTH///wf///xAMAAAAACHB3f3//8H////cDgAAAAAALB3zH//D//M9wMAAAAAAAgLB0
40+
z39///xHAwgAAAAAAAgLB3d3RHd3cDCAAAAAAAAAgLAHd0R3cAMIAAAAAAAAgAgLcAAA
41+
AAMwgAgAAAAACDAAAAu7t7cwAAgDgAAAAABzcIAAAAAAAAgDMwAAAAAAN7uwgAAAAAgH
42+
MzMAAAAACH97tzAAAAALu3c3gAAAAAAL+7tzDABAu7f7cAAAAAAACA+3MA7EQAv/sIAA
43+
AAAAAAAIAAAAAAAAAIAAAAAA
44+
45+
--1618492860--2051301190--113853680--
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# -*- coding: latin1 -*-
2-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
3-
# at the start of it. Make sure this is preserved if any changes
4-
# are made! Also note that the coding cookie above conflicts with
5-
# the presense of a utf-8 BOM signature -- this is intended.
6-
7-
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
8-
x = 'ЉЊЈЁЂ'
9-
def y():
10-
"""
11-
And again in a comment. ЉЊЈЁЂ
12-
"""
13-
pass
1+
# -*- coding: latin1 -*-
2+
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
3+
# at the start of it. Make sure this is preserved if any changes
4+
# are made! Also note that the coding cookie above conflicts with
5+
# the presense of a utf-8 BOM signature -- this is intended.
6+
7+
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
8+
x = 'ЉЊЈЁЂ'
9+
def y():
10+
"""
11+
And again in a comment. ЉЊЈЁЂ
12+
"""
13+
pass
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
2-
# at the start of it. Make sure this is preserved if any changes
3-
# are made!
4-
5-
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
6-
x = 'ЉЊЈЁЂ'
7-
def y():
8-
"""
9-
And again in a comment. ЉЊЈЁЂ
10-
"""
11-
pass
1+
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
2+
# at the start of it. Make sure this is preserved if any changes
3+
# are made!
4+
5+
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
6+
x = 'ЉЊЈЁЂ'
7+
def y():
8+
"""
9+
And again in a comment. ЉЊЈЁЂ
10+
"""
11+
pass
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# -*- coding: utf-8 -*-
2-
# IMPORTANT: unlike the other test_tokenize-*.txt files, this file
3-
# does NOT have the utf-8 BOM signature '\xef\xbb\xbf' at the start
4-
# of it. Make sure this is not added inadvertently by your editor
5-
# if any changes are made to this file!
6-
7-
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
8-
x = 'ЉЊЈЁЂ'
9-
def y():
10-
"""
11-
And again in a comment. ЉЊЈЁЂ
12-
"""
13-
pass
1+
# -*- coding: utf-8 -*-
2+
# IMPORTANT: unlike the other test_tokenize-*.txt files, this file
3+
# does NOT have the utf-8 BOM signature '\xef\xbb\xbf' at the start
4+
# of it. Make sure this is not added inadvertently by your editor
5+
# if any changes are made to this file!
6+
7+
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
8+
x = 'ЉЊЈЁЂ'
9+
def y():
10+
"""
11+
And again in a comment. ЉЊЈЁЂ
12+
"""
13+
pass
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# -*- coding: utf-8 -*-
2-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
3-
# at the start of it. Make sure this is preserved if any changes
4-
# are made!
5-
6-
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
7-
x = 'ЉЊЈЁЂ'
8-
def y():
9-
"""
10-
And again in a comment. ЉЊЈЁЂ
11-
"""
12-
pass
1+
# -*- coding: utf-8 -*-
2+
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
3+
# at the start of it. Make sure this is preserved if any changes
4+
# are made!
5+
6+
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
7+
x = 'ЉЊЈЁЂ'
8+
def y():
9+
"""
10+
And again in a comment. ЉЊЈЁЂ
11+
"""
12+
pass

0 commit comments

Comments
 (0)