开发者

Are annotations supported by Python 2.6.x

开发者 https://www.devze.com 2023-02-22 05:08 出处:网络
I am referring to JUnit annotations like @test, @before , @after. e.g i can write a method: @Ignore(\"Not Ready to Run\")

I am referring to JUnit annotations like @test, @before , @after.

e.g i can write a method:

@Ignore("Not Ready to Run")
    @Test
     multiplication():
                self.assertEqu开发者_如何学Goal('15', simpleMath.multiply(3, 5)) 


That syntax is called decorator in python 2.6. I'm not sure whether it is the same thing as an innotation though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号