def test_int32_field(self): """Test int32 fields.""" ob = FieldTest() self.assertTrue(ob.Int32Field == 0) ob.Int32Field = 1 self.assertTrue(ob.Int32Field == 1)
def test_double_field(): """Test double fields.""" ob = FieldTest() assert ob.DoubleField == 0.0 ob.DoubleField = 1.1 assert ob.DoubleField == 1.1
def test_string_field(): """Test string fields.""" ob = FieldTest() assert ob.StringField == "spam" ob.StringField = "eggs" assert ob.StringField == "eggs"
def test_uint16_field(): """Test uint16 fields.""" ob = FieldTest() assert ob.UInt16Field == 0 ob.UInt16Field = 1 assert ob.UInt16Field == 1
def test_uint64_field(): """Test uint64 fields.""" ob = FieldTest() assert ob.UInt64Field == 0 ob.UInt64Field = 1 assert ob.UInt64Field == 1
def test_double_field(self): """Test double fields.""" ob = FieldTest() self.assertTrue(ob.DoubleField == 0.0) ob.DoubleField = 1.1 self.assertTrue(ob.DoubleField == 1.1)
def test_string_field(self): """Test string fields.""" ob = FieldTest() self.assertTrue(ob.StringField == "spam") ob.StringField = "eggs" self.assertTrue(ob.StringField == "eggs")
def testEnumField(self): """Test enum fields.""" object = FieldTest() self.assertTrue(object.EnumField == ShortEnum.Zero) object.EnumField = ShortEnum.One self.assertTrue(object.EnumField == ShortEnum.One)
def testByteField(self): """Test byte fields.""" object = FieldTest() self.assertTrue(object.ByteField == 0) object.ByteField = 1 self.assertTrue(object.ByteField == 1)
def testDecimalField(self): """Test decimal fields.""" object = FieldTest() self.assertTrue(object.DecimalField == System.Decimal(0)) object.DecimalField = System.Decimal(1) self.assertTrue(object.DecimalField == System.Decimal(1))
def testStringField(self): """Test string fields.""" object = FieldTest() self.assertTrue(object.StringField == "spam") object.StringField = "eggs" self.assertTrue(object.StringField == "eggs")
def testDoubleField(self): """Test double fields.""" object = FieldTest() self.assertTrue(object.DoubleField == 0.0) object.DoubleField = 1.1 self.assertTrue(object.DoubleField == 1.1)
def testSingleField(self): """Test single fields.""" object = FieldTest() self.assertTrue(object.SingleField == 0.0) object.SingleField = 1.1 self.assertTrue(object.SingleField == 1.1)
def testUInt64Field(self): """Test uint64 fields.""" object = FieldTest() self.assertTrue(object.UInt64Field == 0) object.UInt64Field = 1 self.assertTrue(object.UInt64Field == 1)
def test_uint64_field(self): """Test uint64 fields.""" ob = FieldTest() self.assertTrue(ob.UInt64Field == 0) ob.UInt64Field = 1 self.assertTrue(ob.UInt64Field == 1)
def testInt32Field(self): """Test int32 fields.""" object = FieldTest() self.assertTrue(object.Int32Field == 0) object.Int32Field = 1 self.assertTrue(object.Int32Field == 1)
def test_single_field(self): """Test single fields.""" ob = FieldTest() self.assertTrue(ob.SingleField == 0.0) ob.SingleField = 1.1 self.assertTrue(ob.SingleField == 1.1)
def test_decimal_field(self): """Test decimal fields.""" ob = FieldTest() self.assertTrue(ob.DecimalField == System.Decimal(0)) ob.DecimalField = System.Decimal(1) self.assertTrue(ob.DecimalField == System.Decimal(1))
def test_byte_field(): """Test byte fields.""" ob = FieldTest() assert ob.ByteField == 0 ob.ByteField = 1 assert ob.ByteField == 1
def test_uint32_field(): """Test uint32 fields.""" ob = FieldTest() assert ob.UInt32Field == 0 ob.UInt32Field = 1 assert ob.UInt32Field == 1
def test_single_field(): """Test single fields.""" ob = FieldTest() assert ob.SingleField == 0.0 ob.SingleField = 1.1 assert ob.SingleField == 1.1
def test_byte_field(self): """Test byte fields.""" ob = FieldTest() self.assertTrue(ob.ByteField == 0) ob.ByteField = 1 self.assertTrue(ob.ByteField == 1)
def test_decimal_field(): """Test decimal fields.""" ob = FieldTest() assert ob.DecimalField == System.Decimal(0) ob.DecimalField = System.Decimal(1) assert ob.DecimalField == System.Decimal(1)
def testByteField(self): """Test byte fields.""" object = FieldTest() self.failUnless(object.ByteField == 0) object.ByteField = 1 self.failUnless(object.ByteField == 1)
def testDoubleField(self): """Test double fields.""" object = FieldTest() self.failUnless(object.DoubleField == 0.0) object.DoubleField = 1.1 self.failUnless(object.DoubleField == 1.1)
def testDecimalField(self): """Test decimal fields.""" object = FieldTest() self.failUnless(object.DecimalField == System.Decimal(0)) object.DecimalField = System.Decimal(1) self.failUnless(object.DecimalField == System.Decimal(1))
def testStringField(self): """Test string fields.""" object = FieldTest() self.failUnless(object.StringField == "spam") object.StringField = "eggs" self.failUnless(object.StringField == "eggs")
def testEnumField(self): """Test enum fields.""" object = FieldTest() self.failUnless(object.EnumField == ShortEnum.Zero) object.EnumField = ShortEnum.One self.failUnless(object.EnumField == ShortEnum.One)
def testSingleField(self): """Test single fields.""" object = FieldTest() self.failUnless(object.SingleField == 0.0) object.SingleField = 1.1 self.failUnless(object.SingleField == 1.1)
def testUInt64Field(self): """Test uint64 fields.""" object = FieldTest() self.failUnless(object.UInt64Field == 0) object.UInt64Field = 1 self.failUnless(object.UInt64Field == 1)
def testInt32Field(self): """Test int32 fields.""" object = FieldTest() self.failUnless(object.Int32Field == 0) object.Int32Field = 1 self.failUnless(object.Int32Field == 1)
def test_enum_field(): """Test enum fields.""" from Python.Test import ShortEnum ob = FieldTest() assert ob.EnumField == ShortEnum.Zero ob.EnumField = ShortEnum.One assert ob.EnumField == ShortEnum.One
def test_read_only_instance_field(): """Test readonly instance fields.""" assert FieldTest().ReadOnlyField == 0 with pytest.raises(TypeError): FieldTest().ReadOnlyField = 1 with pytest.raises(TypeError): del FieldTest().ReadOnlyField
def test_public_instance_field(): """Test public instance fields.""" ob = FieldTest() assert ob.PublicField == 0 ob.PublicField = 1 assert ob.PublicField == 1 with pytest.raises(TypeError): del FieldTest().PublicField
def test_protected_instance_field(): """Test protected instance fields.""" ob = FieldTest() assert ob.ProtectedField == 0 ob.ProtectedField = 1 assert ob.ProtectedField == 1 with pytest.raises(TypeError): del FieldTest().ProtectedField
def test_internal_field(): """Test internal fields.""" with pytest.raises(AttributeError): _ = FieldTest().InternalField with pytest.raises(AttributeError): _ = FieldTest().InternalStaticField with pytest.raises(AttributeError): _ = FieldTest.InternalStaticField
def test_private_field(): """Test private fields.""" with pytest.raises(AttributeError): _ = FieldTest().PrivateField with pytest.raises(AttributeError): _ = FieldTest().PrivateStaticField with pytest.raises(AttributeError): _ = FieldTest.PrivateStaticField