Use test_support.requires() to decide whether additional largefile

tests should be run.
This commit is contained in:
Barry Warsaw 2001-08-20 22:37:34 +00:00
parent 08fca52125
commit 7fdfc3885c

View file

@ -30,13 +30,14 @@ size = 2500000000L
name = test_support.TESTFN name = test_support.TESTFN
# on Windows this test comsumes large resources: # On Windows this test comsumes large resources; It takes a long time to build
# it takes a long time to build the >2GB file and takes >2GB of disk space # the >2GB file and takes >2GB of disk space therefore the resource must be
# therefore test_support.use_large_resources must be defined to run this test # enabled to run this test. If not, nothing after this line stanza will be
if sys.platform[:3] == 'win' and not test_support.use_large_resources: # executed.
raise test_support.TestSkipped, \ if sys.platform[:3] == 'win':
"test requires %s bytes and a long time to run" % str(size) test_support.requires(
'largefile',
'test requires %s bytes and a long time to run' % str(size))
def expect(got_this, expect_this): def expect(got_this, expect_this):