format_test.py 文件源码

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

项目:girder_worker 作者: girder 项目源码 文件源码
def test_converter_path(self):
        with self.assertRaisesRegexp(Exception, 'No such validator foo/bar'):
            converter_path(Validator('foo', 'bar'), Validator('foo', 'baz'))

        # There is no path for types which lie in different components
        with self.assertRaises(NetworkXNoPath):
            converter_path(self.stringTextValidator,
                           Validator('graph', 'networkx'))

        self.assertEquals(converter_path(self.stringTextValidator,
                                         self.stringTextValidator), [])

        # There is a two-step path converting between these types
        self.assertEquals(len(converter_path(self.stringTextValidator,
                                             Validator('string', 'json'))), 2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号