4b739cb496a24a714ff2628069503fee81b356fa,tests/tests.py,,test_plantcv_white_balance_rgb,#,1701

Before Change


    img = cv2.imread(os.path.join(TEST_DATA, TEST_INPUT_MARKER))
    // Test with debug = "print"
    _ = pcv.white_balance(device=0, img=img, mode="hist", debug="print", roi=(5, 5, 80, 80))
    os.rename("1_whitebalance_roi.png", os.path.join(cache_dir, "1_whitebalance_roi.png"))
    os.rename("1_whitebalance.png", os.path.join(cache_dir, "1_whitebalance.png"))
    // Test with debug = "plot"
    _ = pcv.white_balance(device=0, img=img, mode="max", debug="plot", roi=(5, 5, 80, 80))
    // Test without an ROI
    _ = pcv.white_balance(device=0, img=img, mode="hist", debug=None, roi=None)

After Change


    // Read in test data
    img = cv2.imread(os.path.join(TEST_DATA, TEST_INPUT_MARKER))
    // Test with debug = "print"
    pcv.params.debug = "print"
    _ = pcv.white_balance(img=img, mode="hist", roi=(5, 5, 80, 80))
    // Test with debug = "plot"
    pcv.params.debug = "plot"
    _ = pcv.white_balance(img=img, mode="max", roi=(5, 5, 80, 80))
    // Test without an ROI
    pcv.params.debug = None
    _ = pcv.white_balance(img=img, mode="hist", roi=None)
    // Test with debug = None
    white_balanced = pcv.white_balance(img=img, roi=(5, 5, 80, 80))
    imgavg = np.average(img)
    balancedavg = np.average(white_balanced)
    assert balancedavg != imgavg
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: danforthcenter/plantcv
Commit Name: 4b739cb496a24a714ff2628069503fee81b356fa
Time: 2018-08-10
Author: noahfahlgren@gmail.com
File Name: tests/tests.py
Class Name:
Method Name: test_plantcv_white_balance_rgb


Project Name: danforthcenter/plantcv
Commit Name: 4b739cb496a24a714ff2628069503fee81b356fa
Time: 2018-08-10
Author: noahfahlgren@gmail.com
File Name: tests/tests.py
Class Name:
Method Name: test_plantcv_white_balance_rgb


Project Name: danforthcenter/plantcv
Commit Name: 4b739cb496a24a714ff2628069503fee81b356fa
Time: 2018-08-10
Author: noahfahlgren@gmail.com
File Name: tests/tests.py
Class Name:
Method Name: test_plantcv_white_balance_gray_8bit


Project Name: danforthcenter/plantcv
Commit Name: 4b739cb496a24a714ff2628069503fee81b356fa
Time: 2018-08-10
Author: noahfahlgren@gmail.com
File Name: tests/tests.py
Class Name:
Method Name: test_plantcv_white_balance_gray_16bit