42181e727f7f3ac84c10a80afee048d7444fe3e7,python/tests/test_microservice.py,,test_load_annotations,#Any#,179

Before Change


        ("foo=\nfoo", {"foo": ""}),
    ]
    for data, expected_annotation in read_data:
        m = mock.mock_open(read_data=data)
        with mock.patch("seldon_core.microservice.open", return_value=StringIO(data)):
            assert microservice.load_annotations() == expected_annotation

After Change


    from io import StringIO
    read_data = [
        ("", {}),
        ("\n\n", {}),
        ("foo=bar", {"foo": "bar"}),
        ("foo=bar\nx =y", {"foo": "bar", "x": "y"}),
        ("foo=bar\nfoo=baz\n", {"foo": "baz"}),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: SeldonIO/seldon-core
Commit Name: 42181e727f7f3ac84c10a80afee048d7444fe3e7
Time: 2019-10-11
Author: ugen@cinnamon.is
File Name: python/tests/test_microservice.py
Class Name:
Method Name: test_load_annotations


Project Name: home-assistant/home-assistant
Commit Name: 50f0eac7f37c2339a56f77e12da443edae3bdf9c
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_empty


Project Name: home-assistant/home-assistant
Commit Name: fe8dec27a38cfeeb00129a555e1a4e850b1e4251
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_empty