c19000b012bba5fa7ae54fadc953f5b679dead4f,featurex/tests/test_extractors.py,,test_optical_flow_extractor,#,145

Before Change


    ext = DenseOpticalFlowExtractor()
    timeline = stim.extract([ext])
    df = timeline.to_df()
    assert df.shape == (168, 4)
    target = df.query("name=="total_flow" & onset==3.0")["value"].values
    assert np.isclose(target, 86248.05)

After Change


    video_dir = join(get_test_data_path(), "video")
    stim = VideoStim(join(video_dir, "small.mp4"))
    result = DenseOpticalFlowExtractor().extract(stim).to_df()
    target = result.query("onset==3.0")["total_flow"]
    assert np.isclose(target, 86248.05)


@pytest.mark.skipif(""INDICO_APP_KEY" not in os.environ")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tyarkoni/pliers
Commit Name: c19000b012bba5fa7ae54fadc953f5b679dead4f
Time: 2016-10-20
Author: quinten.mcnamara@gmail.com
File Name: featurex/tests/test_extractors.py
Class Name:
Method Name: test_optical_flow_extractor


Project Name: HazyResearch/fonduer
Commit Name: b9f40fb90f0ad5d9dca8168db4040462a46510a8
Time: 2018-08-06
Author: lwhsiao@stanford.edu
File Name: tests/candidates/test_candidates.py
Class Name:
Method Name: test_cand_gen


Project Name: home-assistant/home-assistant
Commit Name: 61909e873f894591419ef25015df8360650886c3
Time: 2017-02-26
Author: paulus@paulusschoutsen.nl
File Name: tests/components/recorder/test_init.py
Class Name: TestRecorder
Method Name: test_saving_state