Fix use of test skipping API.

This commit is contained in:
Antoine Pitrou 2009-04-19 00:10:36 +00:00
parent cf4c749680
commit c50cb8e9c1
1 changed files with 3 additions and 3 deletions

View File

@ -509,11 +509,11 @@ class IOTest(unittest.TestCase):
# Issue #1174606: reading from an unbounded stream such as /dev/zero.
zero = "/dev/zero"
if not os.path.exists(zero):
self.skip("{0} does not exist".format(zero))
self.skipTest("{0} does not exist".format(zero))
if sys.maxsize > 0x7FFFFFFF:
self.skip("test can only run in a 32-bit address space")
self.skipTest("test can only run in a 32-bit address space")
if support.real_max_memuse < support._2G:
self.skip("test requires at least 2GB of memory")
self.skipTest("test requires at least 2GB of memory")
with open(zero, "rb", buffering=0) as f:
self.assertRaises(OverflowError, f.read)
with open(zero, "rb") as f: