예제 #1
0
파일: base.py 프로젝트: brmed/py-notify
 def test_derivation_dict_3(self):
     # But test it notices there is a dict already over intermediate type.
     DerivedType3 = (AbstractValueObject.derive_type(
         'DerivedType1',
         dict=True).derive_type('DerivedType2').derive_type('DerivedType3',
                                                            dict=True))
     DerivedType3().this_attribute_isnt_declared_but_there_is_a_dict = None
예제 #2
0
파일: base.py 프로젝트: brmed/py-notify
 def test_derivation_dict_2(self):
     # Test that derivation mechanism gracefully ignores second `dict'.
     DerivedType2 = (AbstractValueObject.derive_type('DerivedType1',
                                                     dict=True).derive_type(
                                                         'DerivedType2',
                                                         dict=True))
     DerivedType2().this_attribute_isnt_declared_but_there_is_a_dict = None
예제 #3
0
 def test_derivation_dict_1 (self):
     DerivedType1 = AbstractValueObject.derive_type ('DerivedType1', dict = True)
     DerivedType1 ().this_attribute_isnt_declared_but_there_is_a_dict = None
예제 #4
0
 def test_derivation_slots (self):
     DerivedType = AbstractValueObject.derive_type ('DerivedType')
     self.assertRaises (AttributeError, self.non_existing_attribute_setter (DerivedType ()))
예제 #5
0
파일: base.py 프로젝트: brmed/py-notify
 def test_derivation_dict_1(self):
     DerivedType1 = AbstractValueObject.derive_type('DerivedType1',
                                                    dict=True)
     DerivedType1().this_attribute_isnt_declared_but_there_is_a_dict = None
예제 #6
0
파일: base.py 프로젝트: brmed/py-notify
 def test_derivation_slots(self):
     DerivedType = AbstractValueObject.derive_type('DerivedType')
     self.assertRaises(AttributeError,
                       self.non_existing_attribute_setter(DerivedType()))