Disabling Python nosetests

前端 未结 5 1265
南方客
南方客 2020-12-08 18:42

When using nosetests for Python it is possible to disable a unit test by setting the test function\'s __test__ attribute to false. I have implemented this usin

5条回答
  •  眼角桃花
    2020-12-08 19:08

    You can also use unittest.skip decorator:

    import unittest
    
    
    @unittest.skip("temporarily disabled")
    class MyTestCase(unittest.TestCase):
        ...
    

提交回复
热议问题