python unittest howto

后端 未结 3 1964
栀梦
栀梦 2021-01-14 10:38

I`d like to know how I could unit-test the following module.

def download_distribution(url, tempdir):
    \"\"\" Method which downloads the distribution from         


        
3条回答
  •  不思量自难忘°
    2021-01-14 11:16

    Vague question. If you're just looking for a primer for unit testing in general with a Python slant, I recommend Mark Pilgrim's "Dive Into Python" which has a chapter on unit testing with Python. Otherwise you need to clear up what specific issues you are having testing that code.

提交回复
热议问题