Re: Unit tests and coverage

2013-12-29 Thread Ned Batchelder
On 12/28/13 11:21 PM, Joseph L. Casale wrote: I have a script that accepts cmdline arguments and receives input via stdin. I have a unit test for it that uses Popen to setup an environment, pass the args and provide the stdin. Problem is obviously this does nothing for providing coverage. Given

RE: Unit tests and coverage

2013-12-29 Thread Joseph L. Casale
> As the script is being invoked with Popen, I lose that luxury and only gain > the assertions tests but that of course doesn't show me untested branches. Should have read the docs more thoroughly, works quite nice. jlc -- https://mail.python.org/mailman/listinfo/python-list

RE: Unit tests and coverage

2013-12-28 Thread Joseph L. Casale
> So, back to my original question; what do you mean by "providing > coverage"? Hi Roy, I meant touch every line, such as what https://pypi.python.org/pypi/coverage measures. As the script is being invoked with Popen, I lose that luxury and only gain the assertions tests but that of course doesn'

Re: Unit tests and coverage

2013-12-28 Thread Roy Smith
In article , "Joseph L. Casale" wrote: > I have a script that accepts cmdline arguments and receives input via stdin. > I have a unit test for it that uses Popen to setup an environment, pass the > args and provide the stdin. > > Problem is obviously this does nothing for providing coverage. G

Unit tests and coverage

2013-12-28 Thread Joseph L. Casale
I have a script that accepts cmdline arguments and receives input via stdin. I have a unit test for it that uses Popen to setup an environment, pass the args and provide the stdin. Problem is obviously this does nothing for providing coverage. Given the above specifics, anyone know of a way to wor