6e9f01c6cbef924db0e1ced21d9a8ed5ee4951d9,tests/test_app/test_parameters.py,ParametersTests,test_immutability,#ParametersTests#,566

Before Change


        Parameters: attempt to modify object raises error 
        self.assertRaises(NotImplementedError, self.p2.__setitem__, 9)
        self.assertRaises(NotImplementedError, self.p2.setdefault, 9)
        self.assertRaises(NotImplementedError, self.p2.update, {9: 0})
        self.assertRaises(NotImplementedError, self.p2.__delitem__, "-p")

    def test_all_off(self):
        Parameters: all_off() should turn all parametes off

After Change


    def test_immutability(self):
        Parameters: attempt to modify object raises error 
        try:
            self.p2["-p"] = 42
        except TypeError:
            pass
        else:
            raise AttributeError("Parameters shouldn"t support assignment.")
            
        try:
            del self.p2["-p"]
        except TypeError:
            pass
        else:
            raise AttributeError("Parameters shouldn"t support deletion.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: biocore/scikit-bio
Commit Name: 6e9f01c6cbef924db0e1ced21d9a8ed5ee4951d9
Time: 2013-12-20
Author: gregcaporaso@gmail.com
File Name: tests/test_app/test_parameters.py
Class Name: ParametersTests
Method Name: test_immutability


Project Name: CellProfiler/CellProfiler
Commit Name: 01bc4e74733031805ac70e1b0968bd0d978136d0
Time: 2014-05-06
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/overlayoutlines.py
Class Name: OverlayOutlines
Method Name: prepare_settings


Project Name: biocore/scikit-bio
Commit Name: 6e9f01c6cbef924db0e1ced21d9a8ed5ee4951d9
Time: 2013-12-20
Author: gregcaporaso@gmail.com
File Name: tests/test_app/test_parameters.py
Class Name: ParametersTests
Method Name: test_immutability


Project Name: ilastik/ilastik
Commit Name: d29d4bfe230a51fb4e016c4d6237337389d98669
Time: 2013-05-17
Author: bergs@janelia.hhmi.org
File Name: ilastik/workflows/carving/carvingWorkflow.py
Class Name: CarvingWorkflow
Method Name: __init__


Project Name: openml/openml-python
Commit Name: 52d01402e7316e3ff09bcc578716ef75f82d5ade
Time: 2016-09-05
Author: feurerm@informatik.uni-freiburg.de
File Name: tests/flows/test_sklearn.py
Class Name: TestSklearn
Method Name: test_serialize_pipeline


Project Name: MLWave/kepler-mapper
Commit Name: 9124674b0bab9afa799b219d904bdb65fe4310c8
Time: 2018-05-10
Author: nat@saulgill.com
File Name: test/test_visuals.py
Class Name: TestVisualHelpers
Method Name: test_format_meta