def test_column_synonyms(self):

        addresses, users, Address = (self.tables.addresses,
                                     self.tables.users,
                                     self.classes.Address)

        assert_col = []

        class User(object):

            def _get_name(self):
                assert_col.append(('get', self._name))
                return self._name

            def _set_name(self, name):
                assert_col.append(('set', name))
                self._name = name
            name = property(_get_name, _set_name)

        mapper(Address, addresses)
        mapper(User, users, properties={
            'addresses': relationship(Address, lazy='select'),
            'name': synonym('_name', map_column=True)
        })

        # test compile
        assert not isinstance(User.name == 'jack', bool)

        assert hasattr(User, 'name')
        assert hasattr(User, '_name')

        sess = create_session()
        u = sess.query(User).filter(User.name == 'jack').one()
        eq_(u.name, 'jack')
        u.name = 'foo'
        eq_(u.name, 'foo')
        eq_(assert_col, [('get', 'jack'), ('set', 'foo'), ('get', 'foo')])
.. todo::
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_mapper.py/MapperTest.test_column_synonyms--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/blocks.py/StackedBlocks.get_output_space