summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-05 01:18:04 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-05 01:18:04 (GMT)
commitb8f22b1498904016fda0566dcea3246b27fdcae6 (patch)
tree134490632ea099702a7a903f8d8fac5ded37dceb /Lib
parent6f666485084027582297f392f4fa9b2a5a662d1a (diff)
downloadcpython-b8f22b1498904016fda0566dcea3246b27fdcae6.zip
cpython-b8f22b1498904016fda0566dcea3246b27fdcae6.tar.gz
cpython-b8f22b1498904016fda0566dcea3246b27fdcae6.tar.bz2
Merged revisions 78673 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78673 | florent.xicluna | 2010-03-05 02:05:55 +0100 (ven, 05 mar 2010) | 2 lines Let's use assertIsNone / assertIsNotNone. It's hype. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index ad76335..09cfee8 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -653,17 +653,16 @@ class POSIXProcessTestCase(unittest.TestCase):
# Let the process initialize correctly (Issue #3137)
time.sleep(0.1)
- self.assertIs(p.poll(), None)
+ self.assertIsNone(p.poll())
count, maxcount = 0, 3
# Retry if the process do not receive the SIGINT signal.
while count < maxcount and p.poll() is None:
p.send_signal(signal.SIGINT)
time.sleep(0.1)
count += 1
- if p.poll() is None:
- raise support.TestFailed("the subprocess did not receive "
- "the signal SIGINT")
- elif count > 1:
+ self.assertIsNotNone(p.poll(), "the subprocess did not receive "
+ "the signal SIGINT")
+ if count > 1:
print("p.send_signal(SIGINT) succeeded "
"after {} attempts".format(count), file=sys.stderr)
self.assertNotEqual(p.wait(), 0)