[pypy-svn] r47542 - pypy/dist/pypy/module/bz2/test
arigo at codespeak.net
arigo at codespeak.net
Thu Oct 18 13:33:38 CEST 2007
Author: arigo
Date: Thu Oct 18 13:33:37 2007
New Revision: 47542
Modified:
pypy/dist/pypy/module/bz2/test/test_bz2_compdecomp.py
Log:
Skip "huge" tests by default.
Modified: pypy/dist/pypy/module/bz2/test/test_bz2_compdecomp.py
==============================================================================
--- pypy/dist/pypy/module/bz2/test/test_bz2_compdecomp.py (original)
+++ pypy/dist/pypy/module/bz2/test/test_bz2_compdecomp.py Thu Oct 18 13:33:37 2007
@@ -2,6 +2,8 @@
from pypy.module.bz2.test.support import CheckAllocation
import os
+HUGE_OK = False
+
if os.name == "nt":
from py.test import skip
skip("bz2 module is not available on Windows")
@@ -35,6 +37,7 @@
cls.space = space
cls.w_TEXT = space.wrap(TEXT)
cls.w_decompress = space.wrap(decompress)
+ cls.w_HUGE_OK = space.wrap(HUGE_OK)
def test_creation(self):
from bz2 import BZ2Compressor
@@ -55,6 +58,8 @@
assert self.decompress(data) == self.TEXT
def test_compress_huge_data(self):
+ if not self.HUGE_OK:
+ skip("skipping test requiring lots of memory")
from bz2 import BZ2Compressor
HUGE_DATA = self.TEXT * 10000
@@ -146,6 +151,7 @@
cls.w_TEXT = space.wrap(TEXT)
cls.w_DATA = space.wrap(DATA)
cls.w_decompress = space.wrap(decompress)
+ cls.w_HUGE_OK = space.wrap(HUGE_OK)
def test_compress_function(self):
from bz2 import compress
@@ -158,6 +164,8 @@
assert self.decompress(data) == self.TEXT
def test_compress_function_huge_data(self):
+ if not self.HUGE_OK:
+ skip("skipping test requiring lots of memory")
from bz2 import compress
HUGE_DATA = self.TEXT * 10000
More information about the Pypy-commit
mailing list