Python??????????pytest-?????в???????
???????????? ???????[ 2015/9/7 10:27:21 ] ????????Python ??????? ????????
????????
????pytest????????????????Python?????????????????д??????????
??????????????????????????
????l ??黯parametrizeable??????2.3???????????
????l ??????????????????????
????l ???????????????
????l Skip??xfail????????????????????????2.4?????
????l ???xdist??????????????CPU
????l ????????????????????
????l ????????Python???????
????Home Page: http://pytest.org
???????
????>pip install -U pytest # ???pip???
????>py.test --version # ??pytest?汾
????This is pytest version 2.7.2?? imported from C:Python27libsite-packagespytest.pyc
???????????
???????????????????????????????????в????
????#coding=utf-8
????# ????
????def func(x):
????return x + 1
????# ????????
????def test_answer():
????assert func(3) == 5
?????л??????????????????????“py.test”???????в????
????>py.test
??????н?????????
????===================================================================
????????????????д????????????????
????#coding=utf-8
????class TestClass:
????def test_one(self):
????x = "this"
????assert "h" in x
????def test_two(self):
????x = "hello"
????assert x == "hi"
???????в????
????>py.test -q test_class.py
????-q ?quiet????????????????????????????????????????????? ??????????????????????????????????????Щpytest??汾?????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11