testing.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:stalker_pyramid 作者: eoyilmaz 项目源码 文件源码
def tearDown(self):
        """clean up the test
        """
        import datetime
        import transaction
        from stalker import defaults
        from stalker.db.session import DBSession
        from stalker.db.declarative import Base
        from pyramid import testing

        testing.tearDown()

        # clean up test database
        connection = DBSession.connection()
        engine = connection.engine
        connection.close()
        Base.metadata.drop_all(engine)
        transaction.commit()
        DBSession.remove()

        defaults.timing_resolution = datetime.timedelta(hours=1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号