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])
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: 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: __init__


Project Name: matthewwithanm/django-imagekit
Commit Name: 33dd02d5687169d42cc0d46a7207cb0db7787ca2
Time: 2009-01-04
Author: justin.driscoll@gmail.com
File Name: src/imagekit/tests.py
Class Name: PLTest
Method Name: setUp