01adb744cec7cb1902348bc2329b664578c01a14,mvpa2/tests/test_constraints.py,ComplexConstraintsTests,test_constraints,#ComplexConstraintsTests#,115

Before Change


        assert_equal(c(7.0), 7.0)
        // this should always fail
        c = Constraints(EnsureFloat(), EnsureRange(max=4), EnsureRange(min=9))
        self.assertRaises(ValueError, lambda: c(1.0))

    def test_altconstraints(self):
        // this should always work
        c = AltConstraints(EnsureFloat())

After Change


        assert_raises(ValueError, c, 3.9)
        assert_raises(ValueError, c, 9.01)
        // __and__ form
        c = EnsureFloat() & EnsureRange(min=4) & EnsureRange(max=9)
        assert_equal(c(7.0), 7.0)
        assert_raises(ValueError, c, 3.99)
        assert_raises(ValueError, c, 9.01)
        // and reordering should not have any effect
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: PyMVPA/PyMVPA
Commit Name: 01adb744cec7cb1902348bc2329b664578c01a14
Time: 2014-02-20
Author: debian@onerussian.com
File Name: mvpa2/tests/test_constraints.py
Class Name: ComplexConstraintsTests
Method Name: test_constraints


Project Name: PyMVPA/PyMVPA
Commit Name: dd19fc04a3b9f7d1e6efa624e09478bc2dcf0d9a
Time: 2014-02-23
Author: debian@onerussian.com
File Name: mvpa2/tests/test_constraints.py
Class Name: ComplexConstraintsTests
Method Name: test_constraints


Project Name: PyMVPA/PyMVPA
Commit Name: 01adb744cec7cb1902348bc2329b664578c01a14
Time: 2014-02-20
Author: debian@onerussian.com
File Name: mvpa2/tests/test_constraints.py
Class Name: ComplexConstraintsTests
Method Name: test_altconstraints


Project Name: PyMVPA/PyMVPA
Commit Name: dd19fc04a3b9f7d1e6efa624e09478bc2dcf0d9a
Time: 2014-02-23
Author: debian@onerussian.com
File Name: mvpa2/tests/test_constraints.py
Class Name: ComplexConstraintsTests
Method Name: test_altconstraints