test_wrapper.py 文件源码

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

项目:metan 作者: utatsuya 项目源码 文件源码
def test_cached_attribute(self):
        print(u"test_cached_attribute")
        cmds.file(new=True, f=True)
        cube = cmds.polyCube()[0]
        m1 = mtn.M(u"pCube1")
        # m1._cache = True # default:True
        m2 = mtn.M(u"pCube1")
        m2._cache = False
        assert(m1._cache_attribute == {})
        assert(m2._cache_attribute == {})
        m1.t
        m2.t
        assert(u"t" in m1._cache_attribute)
        assert(u"t" not in m2._cache_attribute)
        assert(m1._cache == True)
        assert(m2._cache == False)
        assert(m1.t._cache == True)
        assert(m2.t._cache == False)
        assert(m1.t.tx._cache == True)
        assert(m2.t.tx._cache == False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号