Skip to content

Commit 1a2e6c8

Browse files
committed
tests: Disable large-read test to avoid consuming too much RAM
There's no good way to conditionalize on the amount of system RAM using only the stdlib.
1 parent e09b1b6 commit 1a2e6c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_openslide.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,13 @@ def test_read_region_bad_size(self):
122122
self.assertRaises(OpenSlideError,
123123
lambda: self.osr.read_region((0, 0), 1, (400, -5)))
124124

125+
# Disabled to avoid OOM killer on small systems, since the stdlib
126+
# doesn't provide a way to find out how much RAM we have
125127
@skip_if(sys.maxsize < 1 << 32, '32-bit Python')
126128
# Also skips Pillow < 2.1.0
127129
@skip_if(have_optimizations and not hasattr(Image, 'PILLOW_VERSION'),
128130
'broken on PIL')
129-
def test_read_region_2GB(self):
131+
def _test_read_region_2GB(self):
130132
self.assertEqual(
131133
self.osr.read_region((1000, 1000), 0, (32768, 16384)).size,
132134
(32768, 16384))

0 commit comments

Comments
 (0)