81137bc5d0d742cfe2e349ec43b83f0325f7f30e,descarteslabs/catalog/tests/test_attributes.py,TestAttributes,test_list_attribute_delegate_mutable_methods_mapping_items,#TestAttributes#,612

Before Change


        mapping1.bar = "baz"
        assert not model_object.is_modified

        if PY3:
            la.append(dict(bar="foo"))
            new_mapping = la[0]
            la.clear()
            assert la == []
            assert model_object.is_modified
            model_object._clear_modified_attributes()
            new_mapping.bar = "baz"
            assert not model_object.is_modified

        la.extend([dict(bar="foo"), dict(bar="baz")])
        assert la == [Mapping(bar="foo"), Mapping(bar="baz")]
        assert model_object.is_modified
        model_object._clear_modified_attributes()

After Change



        la.append(dict(bar="foo"))
        new_mapping = la[0]
        la.clear()
        assert la == []
        assert model_object.is_modified
        model_object._clear_modified_attributes()
        new_mapping.bar = "baz"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: descarteslabs/descarteslabs-python
Commit Name: 81137bc5d0d742cfe2e349ec43b83f0325f7f30e
Time: 2020-01-16
Author: jaap@descarteslabs.com
File Name: descarteslabs/catalog/tests/test_attributes.py
Class Name: TestAttributes
Method Name: test_list_attribute_delegate_mutable_methods_mapping_items


Project Name: facebookresearch/ParlAI
Commit Name: 82ce7a7120ed2484c3b8c36ae33e628a6c3550ca
Time: 2019-02-14
Author: edinan@fb.com
File Name: parlai/tasks/opensubtitles/agents.py
Class Name: FullTeacher
Method Name: setup_data


Project Name: descarteslabs/descarteslabs-python
Commit Name: 81137bc5d0d742cfe2e349ec43b83f0325f7f30e
Time: 2020-01-16
Author: jaap@descarteslabs.com
File Name: descarteslabs/catalog/tests/test_attributes.py
Class Name: TestAttributes
Method Name: test_list_attribute_delegate_mutable_methods_simple_items


Project Name: DexterInd/GoPiGo3
Commit Name: e7d3678b0dbe521e172f630bdedb99eef6786742
Time: 2018-03-22
Author: robert.lucian.chiriac@gmail.com
File Name: Projects/IntelligentObjectAvoider/robot.py
Class Name:
Method Name: robotController


Project Name: openai/gym
Commit Name: 2e8141b00ddd3a76238abe95b44d56a39bc90885
Time: 2019-03-08
Author: christopherhesse@users.noreply.github.com
File Name: gym/envs/box2d/car_racing.py
Class Name: CarRacing
Method Name: render