Unittest causing sys.exit()

前端 未结 6 874
死守一世寂寞
死守一世寂寞 2020-12-08 16:03

No matter what I do sys.exit() is called by unittest, even the most trivial examples. I can\'t tell if my install is messed up or what is going on.

IDLE 1.2         


        
6条回答
  •  攒了一身酷
    2020-12-08 16:28

    try:
        sys.exit()
    except SystemExit:
        print('Simple as that, but you should really use a TestRunner instead')
    

提交回复
热议问题