def test_setting_density(self):
        section = BaseSection(density=2)
        
        self.assertRaises(AttributeError, setattr, section, "density", 3.0)
        self.assertEqual(section.density, 2.0)
        self.assertIsInstance(section.density, float)
        
        self.assertRaises(ValueError, section.set_density, "abc")
        self.assertRaises(ValueError, section.set_density, 0.0)

        section.set_density(3)
        self.assertEqual(section.density, 3.0)
        self.assertIsInstance(section.density, float)
    def test_setting_density(self):
        section = BaseSection(density=2)

        self.assertRaises(AttributeError, setattr, section, "density", 3.0)
        self.assertEqual(section.density, 2.0)
        self.assertIsInstance(section.density, float)

        self.assertRaises(ValueError, section.set_density, "abc")
        self.assertRaises(ValueError, section.set_density, 0.0)

        section.set_density(3)
        self.assertEqual(section.density, 3.0)
        self.assertIsInstance(section.density, float)