summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-05 01:05:55 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-05 01:05:55 (GMT)
commitd6935631daf3c0da5db624ecb4d823d7a8b9b7a7 (patch)
tree03318f89706174a1a8f06cad6f230f89a12468fa /Lib/test
parent80e0e2d2d8e648f89e216a6fbcd9b96122a3fa69 (diff)
downloadcpython-d6935631daf3c0da5db624ecb4d823d7a8b9b7a7.zip
cpython-d6935631daf3c0da5db624ecb4d823d7a8b9b7a7.tar.gz
cpython-d6935631daf3c0da5db624ecb4d823d7a8b9b7a7.tar.bz2
Let's use assertIsNone / assertIsNotNone. It's hype.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_subprocess.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index ea4f5ab..8444909 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -655,17 +655,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 test_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 >>sys.stderr, ("p.send_signal(SIGINT) succeeded "
"after {} attempts".format(count))
self.assertNotEqual(p.wait(), 0)
@@ -824,6 +823,7 @@ def test_main():
ProcessTestCaseNoPoll,
HelperFunctionTests)
+ unit_tests = ( POSIXProcessTestCase,)
test_support.run_unittest(*unit_tests)
test_support.reap_children()