2e21c14efc0f1e7cd344843e99c90c673292dbcd,tests/tpot_tests.py,,test_check_periodic_pipeline_3,#,1044

Before Change


    // will pass
    tpot_obj._check_periodic_pipeline(1)
    tpot_obj._last_optimized_pareto_front_n_gens = 3
    assert_raises(StopIteration, tpot_obj._check_periodic_pipeline, 1)


def test_save_periodic_pipeline():
    Assert that the _save_periodic_pipeline does not export periodic pipeline if exception happened

After Change


        config_dict="TPOT light"
    )
    tpot_obj.fit(training_features, training_target)
    with closing(StringIO()) as our_file:
        tpot_obj._file = our_file
        tpot_obj.verbosity = 3
        tpot_obj._exported_pipeline_text = []
        tpot_obj._last_pipeline_write = datetime.now()
        sleep(0.11)
        tpot_obj._output_best_pipeline_period_seconds = 0
        tmpdir = mkdtemp() + "/"
        tpot_obj.periodic_checkpoint_folder = tmpdir
        // export once before
        tpot_obj._save_periodic_pipeline(1)

        tpot_obj._save_periodic_pipeline(2)

        our_file.seek(0)
        assert_in("Periodic pipeline was not saved, probably saved before...", our_file.read())
    //clean up
    rmtree(tmpdir)


def test_fit_predict():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: EpistasisLab/tpot
Commit Name: 2e21c14efc0f1e7cd344843e99c90c673292dbcd
Time: 2018-09-20
Author: weixuanf@pennmedicine.upenn.edu
File Name: tests/tpot_tests.py
Class Name:
Method Name: test_check_periodic_pipeline_3


Project Name: home-assistant/home-assistant
Commit Name: c70722dbaef64cb00dbf6793d84b5530856a35cb
Time: 2016-10-20
Author: kellerza@gmail.com
File Name: tests/components/test_updater.py
Class Name: TestUpdater
Method Name: test_no_entity_on_same_version


Project Name: home-assistant/home-assistant
Commit Name: c70722dbaef64cb00dbf6793d84b5530856a35cb
Time: 2016-10-20
Author: kellerza@gmail.com
File Name: tests/components/test_updater.py
Class Name: TestUpdater
Method Name: test_new_version_shows_entity_on_start