Skip to content

Commit 4ce25a3

Browse files
committed
Remove URL test due to 404 and start vm to make sure test works
1 parent 93c6237 commit 4ce25a3

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

bioformats/tests/test_formatreader.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
import javabridge as J
1818
import bioformats.formatreader as F
1919
from bioformats import log4j
20+
import bioformats
2021

2122
class TestFormatReader(unittest.TestCase):
2223
def setUp(self):
24+
J.start_vm(class_path=bioformats.JARS)
2325
J.attach()
2426
log4j.basic_config()
2527

@@ -120,24 +122,24 @@ def test_03_02_load_using_bioformats(self):
120122
self.assertTrue(np.all(expected_0_10_0_10 == data[:10,:10]))
121123
self.assertTrue(np.all(expected_n10_n10 == data[-10:,-10:]))
122124

123-
def test_03_03_load_using_bioformats_url(self):
124-
data = F.load_using_bioformats_url(
125-
"http://www.cellprofiler.org/linked_files/broad-logo.gif",
126-
rescale=False)
127-
self.assertSequenceEqual(data.shape, (38, 150, 3))
128-
expected_0_10_0_10 = np.array([
129-
[181, 176, 185, 185, 175, 175, 176, 195, 187, 185],
130-
[ 25, 7, 7, 7, 2, 2, 13, 13, 0, 1],
131-
[ 21, 1, 1, 0, 0, 1, 0, 1, 0, 0],
132-
[ 64, 13, 1, 1, 12, 12, 2, 1, 1, 1],
133-
[ 22, 56, 26, 13, 1, 1, 6, 0, 0, 0],
134-
[ 12, 13, 82, 57, 9, 12, 2, 6, 6, 6],
135-
[ 12, 13, 20, 89, 89, 21, 11, 12, 1, 0],
136-
[ 6, 1, 7, 21, 89, 102, 26, 0, 10, 1],
137-
[ 26, 0, 0, 1, 20, 84, 151, 58, 12, 1],
138-
[ 23, 6, 1, 1, 0, 1, 55, 166, 100, 12]],
139-
dtype=np.uint8)
140-
self.assertTrue(np.all(expected_0_10_0_10 == data[:10,:10, 0]))
125+
# def test_03_03_load_using_bioformats_url(self):
126+
# data = F.load_using_bioformats_url(
127+
# "http://www.cellprofiler.org/linked_files/broad-logo.gif",
128+
# rescale=False)
129+
# self.assertSequenceEqual(data.shape, (38, 150, 3))
130+
# expected_0_10_0_10 = np.array([
131+
# [181, 176, 185, 185, 175, 175, 176, 195, 187, 185],
132+
# [ 25, 7, 7, 7, 2, 2, 13, 13, 0, 1],
133+
# [ 21, 1, 1, 0, 0, 1, 0, 1, 0, 0],
134+
# [ 64, 13, 1, 1, 12, 12, 2, 1, 1, 1],
135+
# [ 22, 56, 26, 13, 1, 1, 6, 0, 0, 0],
136+
# [ 12, 13, 82, 57, 9, 12, 2, 6, 6, 6],
137+
# [ 12, 13, 20, 89, 89, 21, 11, 12, 1, 0],
138+
# [ 6, 1, 7, 21, 89, 102, 26, 0, 10, 1],
139+
# [ 26, 0, 0, 1, 20, 84, 151, 58, 12, 1],
140+
# [ 23, 6, 1, 1, 0, 1, 55, 166, 100, 12]],
141+
# dtype=np.uint8)
142+
# self.assertTrue(np.all(expected_0_10_0_10 == data[:10,:10, 0]))
141143

142144
def test_04_01_read_omexml_metadata(self):
143145
path = os.path.join(os.path.dirname(__file__), 'Channel1-01-A-01.tif')

0 commit comments

Comments
 (0)