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
76f570a9
Commit
76f570a9
authored
Aug 28, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Make tests faster by reaping threads only at the end
parents
a5dba1ab
d54fa555
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
Lib/test/test_smtplib.py
Lib/test/test_smtplib.py
+1
-4
No files found.
Lib/test/test_smtplib.py
View file @
76f570a9
...
...
@@ -177,7 +177,6 @@ class DebuggingServerTests(unittest.TestCase):
self
.
output
=
io
.
StringIO
()
sys
.
stdout
=
self
.
output
self
.
_threads
=
support
.
threading_setup
()
self
.
serv_evt
=
threading
.
Event
()
self
.
client_evt
=
threading
.
Event
()
# Capture SMTPChannel debug output
...
...
@@ -202,7 +201,6 @@ class DebuggingServerTests(unittest.TestCase):
# wait for the server thread to terminate
self
.
serv_evt
.
wait
()
self
.
thread
.
join
()
support
.
threading_cleanup
(
*
self
.
_threads
)
# restore sys.stdout
sys
.
stdout
=
self
.
old_stdout
# restore DEBUGSTREAM
...
...
@@ -681,7 +679,6 @@ class SMTPSimTests(unittest.TestCase):
def
setUp
(
self
):
self
.
real_getfqdn
=
socket
.
getfqdn
socket
.
getfqdn
=
mock_socket
.
getfqdn
self
.
_threads
=
support
.
threading_setup
()
self
.
serv_evt
=
threading
.
Event
()
self
.
client_evt
=
threading
.
Event
()
# Pick a random unused port by passing 0 for the port number
...
...
@@ -703,7 +700,6 @@ class SMTPSimTests(unittest.TestCase):
# wait for the server thread to terminate
self
.
serv_evt
.
wait
()
self
.
thread
.
join
()
support
.
threading_cleanup
(
*
self
.
_threads
)
def
testBasic
(
self
):
# smoke test
...
...
@@ -816,6 +812,7 @@ class SMTPSimTests(unittest.TestCase):
#test infrastructure can support it.
@
support
.
reap_threads
def
test_main
(
verbose
=
None
):
support
.
run_unittest
(
GeneralTests
,
DebuggingServerTests
,
NonConnectingTests
,
...
...
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