コード例 #1
0
def test_hasattr(user_obj):
    e = sn.hasattr(user_obj, '_c')
    assert not e

    user_obj._c = 1
    assert e
コード例 #2
0
    def test_hasattr(self):
        e = sn.hasattr(self, '_c')
        self.assertFalse(e)

        self._c = 1
        self.assertTrue(e)
コード例 #3
0
    def test_hasattr(self):
        e = sn.hasattr(self, '_c')
        assert not e

        self._c = 1
        assert e