Beispiel #1
0
    def test_observations(self):
        for ct in self.ctypeS:
            print(ct)
            l = Landmark(ctype=ct)

            # default
            nose.tools.assert_equal(l.observations, 0)

            l.observations = 42
            nose.tools.assert_equal(l.observations, 42)
Beispiel #2
0
    def test_observations(self):
        for ct in self.C_TYPES:
            print ct
            l = Landmark(c_type=ct)

            # default
            nose.tools.assert_equal(l.observations, 0)

            l.observations = 42
            nose.tools.assert_equal(l.observations, 42)

            def t():
                l.observations = -6
            nose.tools.assert_raises(ValueError, t)