84c86a04eeb6abead320ef1ffe6a7c32d2ee46aa,tests/test_model.py,,test_dump_load,#Any#,74

Before Change


def test_dump_load(model):
    output = StringIO.StringIO()
    model.dump(output)
    string = output.getvalue()
    assert string
    new_model = LinearModel(3, 6)
    assert model([1, 3, 4]) != new_model([1, 3, 4])
    assert model([2, 5]) != new_model([2, 5])

After Change


    loc = "/tmp/test_model"
    model.end_training()
    model.dump(loc)
    string = open(loc, "rb").read()
    assert string
    new_model = LinearModel(3, 6)
    assert model([1, 3, 4]) != new_model([1, 3, 4])
    assert model([2, 5]) != new_model([2, 5])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: 84c86a04eeb6abead320ef1ffe6a7c32d2ee46aa
Time: 2014-10-28
Author: honnibal@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_dump_load


Project Name: pantsbuild/pants
Commit Name: c94409d9316ae3c863af1a554795f3b4bf962fbd
Time: 2017-10-06
Author: stuhood@twitter.com
File Name: src/python/pants/reporting/reporting.py
Class Name: Reporting
Method Name: update_reporting


Project Name: brian-team/brian2
Commit Name: 1391067c332600b9273d47221f2b27d4b1895414
Time: 2014-11-13
Author: dan.goodman@ens.fr
File Name: brian2/utils/debugging.py
Class Name: std_silent
Method Name: __exit__