supply inputs to python unittests

Posted by zubin71 on Stack Overflow See other posts from Stack Overflow or by zubin71
Published on 2010-04-11T12:57:34Z Indexed on 2010/04/11 13:03 UTC
Read the original article Hit count: 248

Filed under:
|
|

I`m relatively new to the concept of unit-testing and have very little experience in the same. I have been looking at lots of articles on how to write unit-tests; however, I still have difficulty in writing tests where conditions like the following arise:-

  1. Test user Input.
  2. Test input read from a file.
  3. Test input read from an environment variable.

Itd be great if someone could show me how to approach the above mentioned scenarios; itd still be awesome if you could point me to a few docs/articles/blog posts which I could read.

© Stack Overflow or respective owner

Related posts about python

Related posts about unit-testing