def test_reset_cached_properties(self):
        # BaseSection.reset_cached_properties should be called when changing
        # dimensions, density or position
        
        # It should be also checked that cached properties are deleted by
        # reset_cached_properties. This is checked only for subclasses

        def error_raiser():
            raise ValueError
        section = BaseSection()
        section.reset_cached_properties = error_raiser
    	
    	self.assertRaises(ValueError, section.set_dimensions)
    	self.assertRaises(ValueError, section.set_density, 2)
    	self.assertRaises(ValueError, section.set_position, 1, 2, 3)
    def test_reset_cached_properties(self):
        # BaseSection.reset_cached_properties should be called when changing
        # dimensions, density or position

        # It should be also checked that cached properties are deleted by
        # reset_cached_properties. This is checked only for subclasses

        def error_raiser():
            raise ValueError

        section = BaseSection()
        section.reset_cached_properties = error_raiser

        self.assertRaises(ValueError, section.set_dimensions)
        self.assertRaises(ValueError, section.set_density, 2)
        self.assertRaises(ValueError, section.set_position, 1, 2, 3)