tests.py 文件源码

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

项目:mygene.info 作者: biothings 项目源码 文件源码
def test_int_float(self):
        def check_homologene(res):
            for h in res["homologene"]["genes"]:
                eq_(type(h[0]),int)
                eq_(type(h[1]),int)
        def check_exons(res):
            for ex in res["exons"]:
                for pos in ex["position"]:
                    eq_(type(pos[0]),int)
                    eq_(type(pos[1]),int)
        res = self.json_ok(self.get_ok(self.api + "/gene/1017?species=9606&fields=homologene,exons"))
        check_homologene(res)
        check_exons(res)
        resall = self.json_ok(self.get_ok(self.api + "/gene/1017?fields=homologene,exons"))
        check_homologene(resall)
        check_exons(resall)

# Self contained test class, used for CI tools such as Travis
# This will start a Tornado server on its own and perform tests
# against this server.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号