Completed
Push — master ( 03c687...f8239c )
by Chad
15:27
created

test_imagej.test_run_tracking()   A

Complexity

Conditions 3

Size

Total Lines 9
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 3
nop 0
1
import os
2
import pytest
3
import sys
4
import diff_classifier.imagej as ij
5
import os.path as op
6
import tempfile
7
from diff_classifier.utils import csv_to_pd
8
9
is_travis = "CI" in os.environ.keys()
10
is_mac = sys.platform == "darwin"
11
12
13
@pytest.mark.skipif(is_travis, reason="We're running this on Travis")
14
@pytest.mark.skipif(is_mac, reason="This doesn't work on Macs yet")
15
def test_run_tracking():
16
    tf  = tempfile.NamedTemporaryFile(suffix='.csv')
17
    ij.track('http://fiji.sc/samples/FakeTracks.tif', tf.name)
18
    assert op.exists(tf.name)
19
20
    df = csv_to_pd(tf.name)
21
    assert df.shape == (84, 8)
22